Mock Version: 6.0 Mock Version: 6.0 Mock Version: 6.0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/python-starlette.spec'], chrootPath='/var/lib/mock/dist-an23-epao-build-507904-74948/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=982gid=135user='mockbuild'unshare_net=TrueprintOutput=Falsenspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.48tzvvu1:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.48tzvvu1:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '379b04ffac974e2eba610561a0210086', '-D', '/var/lib/mock/dist-an23-epao-build-507904-74948/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.48tzvvu1:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/python-starlette.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1765929600 Wrote: /builddir/build/SRPMS/python-starlette-0.49.1-1.an23.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-starlette.spec'], chrootPath='/var/lib/mock/dist-an23-epao-build-507904-74948/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=982gid=135user='mockbuild'unshare_net=TrueraiseExc=FalseprintOutput=Falsenspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.48tzvvu1:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.48tzvvu1:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '0d7daf7ccc674c31a06e6d91fc82dcf8', '-D', '/var/lib/mock/dist-an23-epao-build-507904-74948/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.48tzvvu1:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-starlette.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1765929600 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.O84NH2 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf starlette-0.49.1 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/starlette-0.49.1.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd starlette-0.49.1 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + sed -i '/^[[:space:]]*license-files[[:space:]]*=/d' pyproject.toml + sed -i '/Programming Language :: Python :: 3.13/d' pyproject.toml + sed -i '\|Programming Language :: Python :: 3\.14|d' pyproject.toml + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.FGy8DJ + umask 022 + cd /builddir/build/BUILD + cd starlette-0.49.1 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/anolis/anolis-hardened-ld -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/starlette-0.49.1/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/anolis/anolis-hardened-ld -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/starlette-0.49.1/.pyproject-builddir + RPM_TOXENV=py311 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/anolis/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/starlette-0.49.1/pyproject-wheeldir --output /builddir/build/BUILD/python-starlette-0.49.1-1.an23.noarch-pyproject-buildrequires Handling hatchling from build-system.requires Requirement not satisfied: hatchling Exiting dependency generation pass: build backend + cat /builddir/build/BUILD/python-starlette-0.49.1-1.an23.noarch-pyproject-buildrequires + rm -rfv '*.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-starlette-0.49.1-1.an23.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-starlette.spec'], chrootPath='/var/lib/mock/dist-an23-epao-build-507904-74948/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=982gid=135user='mockbuild'unshare_net=TrueraiseExc=FalseprintOutput=Falsenspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.48tzvvu1:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.48tzvvu1:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', 'e023cd9e37dd45bea7db932daf64bab2', '-D', '/var/lib/mock/dist-an23-epao-build-507904-74948/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.48tzvvu1:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -br --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-starlette.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1765929600 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.p8Hvhx + umask 022 + cd /builddir/build/BUILD + cd starlette-0.49.1 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/anolis/anolis-hardened-ld -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/starlette-0.49.1/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/anolis/anolis-hardened-ld -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/starlette-0.49.1/.pyproject-builddir + RPM_TOXENV=py311 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/anolis/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/starlette-0.49.1/pyproject-wheeldir --output /builddir/build/BUILD/python-starlette-0.49.1-1.an23.noarch-pyproject-buildrequires Handling hatchling from build-system.requires Requirement satisfied: hatchling (installed: hatchling 1.21.1) Handling anyio<5,>=3.6.2 from hook generated metadata: Requires-Dist (starlette) Requirement satisfied: anyio<5,>=3.6.2 (installed: anyio 3.7.0) Handling typing-extensions>=4.10.0; python_version < '3.13' from hook generated metadata: Requires-Dist (starlette) Requirement satisfied: typing-extensions>=4.10.0; python_version < '3.13' (installed: typing-extensions 4.10.0) Handling httpx<0.29.0,>=0.27.0; extra == 'full' from hook generated metadata: Requires-Dist (starlette) Ignoring alien requirement: httpx<0.29.0,>=0.27.0; extra == 'full' Handling itsdangerous; extra == 'full' from hook generated metadata: Requires-Dist (starlette) Ignoring alien requirement: itsdangerous; extra == 'full' Handling jinja2; extra == 'full' from hook generated metadata: Requires-Dist (starlette) Ignoring alien requirement: jinja2; extra == 'full' Handling python-multipart>=0.0.18; extra == 'full' from hook generated metadata: Requires-Dist (starlette) Ignoring alien requirement: python-multipart>=0.0.18; extra == 'full' Handling pyyaml; extra == 'full' from hook generated metadata: Requires-Dist (starlette) Ignoring alien requirement: pyyaml; extra == 'full' + cat /builddir/build/BUILD/python-starlette-0.49.1-1.an23.noarch-pyproject-buildrequires + rm -rfv starlette-0.49.1.dist-info/ removed 'starlette-0.49.1.dist-info/METADATA' removed directory 'starlette-0.49.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-starlette-0.49.1-1.an23.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -ba --noprep --noclean --target noarch /builddir/build/SPECS/python-starlette.spec'], chrootPath='/var/lib/mock/dist-an23-epao-build-507904-74948/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=982gid=135user='mockbuild'unshare_net=TrueprintOutput=Falsenspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.48tzvvu1:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.48tzvvu1:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '01aa0536b7b44ee1917c1f3f35a48172', '-D', '/var/lib/mock/dist-an23-epao-build-507904-74948/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.48tzvvu1:/etc/resolv.conf', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -ba --noprep --noclean --target noarch /builddir/build/SPECS/python-starlette.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1765929600 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.olxstd + umask 022 + cd /builddir/build/BUILD + cd starlette-0.49.1 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/anolis/anolis-hardened-ld -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/starlette-0.49.1/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/anolis/anolis-hardened-ld -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/starlette-0.49.1/.pyproject-builddir + RPM_TOXENV=py311 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/anolis/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/starlette-0.49.1/pyproject-wheeldir --output /builddir/build/BUILD/python-starlette-0.49.1-1.an23.noarch-pyproject-buildrequires Handling hatchling from build-system.requires Requirement satisfied: hatchling (installed: hatchling 1.21.1) Handling anyio<5,>=3.6.2 from hook generated metadata: Requires-Dist (starlette) Requirement satisfied: anyio<5,>=3.6.2 (installed: anyio 3.7.0) Handling typing-extensions>=4.10.0; python_version < '3.13' from hook generated metadata: Requires-Dist (starlette) Requirement satisfied: typing-extensions>=4.10.0; python_version < '3.13' (installed: typing-extensions 4.10.0) Handling httpx<0.29.0,>=0.27.0; extra == 'full' from hook generated metadata: Requires-Dist (starlette) Ignoring alien requirement: httpx<0.29.0,>=0.27.0; extra == 'full' Handling itsdangerous; extra == 'full' from hook generated metadata: Requires-Dist (starlette) Ignoring alien requirement: itsdangerous; extra == 'full' Handling jinja2; extra == 'full' from hook generated metadata: Requires-Dist (starlette) Ignoring alien requirement: jinja2; extra == 'full' Handling python-multipart>=0.0.18; extra == 'full' from hook generated metadata: Requires-Dist (starlette) Ignoring alien requirement: python-multipart>=0.0.18; extra == 'full' Handling pyyaml; extra == 'full' from hook generated metadata: Requires-Dist (starlette) Ignoring alien requirement: pyyaml; extra == 'full' + cat /builddir/build/BUILD/python-starlette-0.49.1-1.an23.noarch-pyproject-buildrequires + rm -rfv starlette-0.49.1.dist-info/ removed 'starlette-0.49.1.dist-info/METADATA' removed directory 'starlette-0.49.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.C0TWfT + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/anolis/anolis-hardened-ld -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd starlette-0.49.1 + mkdir -p /builddir/build/BUILD/starlette-0.49.1/.pyproject-builddir + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/anolis/anolis-hardened-ld -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/starlette-0.49.1/.pyproject-builddir + /usr/bin/python3 -Bs /usr/lib/rpm/anolis/pyproject_wheel.py /builddir/build/BUILD/starlette-0.49.1/pyproject-wheeldir Looking in indexes: https://mirrors.aliyun.com/pypi/simple/ Processing /builddir/build/BUILD/starlette-0.49.1 Preparing metadata (pyproject.toml): started Running command Preparing metadata (pyproject.toml) Preparing metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: starlette Building wheel for starlette (pyproject.toml): started Running command Building wheel for starlette (pyproject.toml) Building wheel for starlette (pyproject.toml): finished with status 'done' Created wheel for starlette: filename=starlette-0.49.1-py3-none-any.whl size=74170 sha256=68bf53b93af2da4323abec38c23253ae7d31fe3f58a33b9a44615e5f0a226704 Stored in directory: /builddir/.cache/pip/wheels/e7/15/79/abd8f567b44439dccccce12c84f8dbe7d5416829cdcaa4be37 Successfully built starlette + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.nzrdcx + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch ++ dirname /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/anolis/anolis-hardened-ld -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd starlette-0.49.1 ++ ls /builddir/build/BUILD/starlette-0.49.1/pyproject-wheeldir/starlette-0.49.1-py3-none-any.whl ++ xargs basename --multiple ++ sed -E 's/([^-]+)-([^-]+)-.+\.whl/\1==\2/' + specifier=starlette==0.49.1 + TMPDIR=/builddir/build/BUILD/starlette-0.49.1/.pyproject-builddir + /usr/bin/python3 -m pip install --root /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch --prefix /usr --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location --no-index --no-cache-dir --find-links /builddir/build/BUILD/starlette-0.49.1/pyproject-wheeldir starlette==0.49.1 Using pip 23.3.1 from /usr/lib/python3.11/site-packages/pip (python 3.11) Looking in links: /builddir/build/BUILD/starlette-0.49.1/pyproject-wheeldir Processing ./pyproject-wheeldir/starlette-0.49.1-py3-none-any.whl Installing collected packages: starlette Successfully installed starlette-0.49.1 + '[' -d /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/bin ']' + rm -f /builddir/build/BUILD/python-starlette-0.49.1-1.an23.noarch-pyproject-ghost-distinfo + site_dirs=() + '[' -d /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib/python3.11/site-packages ']' + site_dirs+=("/usr/lib/python3.11/site-packages") + '[' /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib64/python3.11/site-packages '!=' /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib/python3.11/site-packages ']' + '[' -d /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib64/python3.11/site-packages ']' + for site_dir in ${site_dirs[@]} + for distinfo in /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch$site_dir/*.dist-info + echo '%ghost /usr/lib/python3.11/site-packages/starlette-0.49.1.dist-info' + sed -i s/pip/rpm/ /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib/python3.11/site-packages/starlette-0.49.1.dist-info/INSTALLER + PYTHONPATH=/usr/lib/rpm/anolis + /usr/bin/python3 -B /usr/lib/rpm/anolis/pyproject_preprocess_record.py --buildroot /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch --record /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib/python3.11/site-packages/starlette-0.49.1.dist-info/RECORD --output /builddir/build/BUILD/python-starlette-0.49.1-1.an23.noarch-pyproject-record + rm -fv /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib/python3.11/site-packages/starlette-0.49.1.dist-info/RECORD removed '/builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib/python3.11/site-packages/starlette-0.49.1.dist-info/RECORD' + rm -fv /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib/python3.11/site-packages/starlette-0.49.1.dist-info/REQUESTED removed '/builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib/python3.11/site-packages/starlette-0.49.1.dist-info/REQUESTED' ++ wc -l /builddir/build/BUILD/python-starlette-0.49.1-1.an23.noarch-pyproject-ghost-distinfo ++ cut -f1 '-d ' + lines=1 + '[' 1 -ne 1 ']' + RPM_PERCENTAGES_COUNT=8 + /usr/bin/python3 /usr/lib/rpm/anolis/pyproject_save_files.py --output-files /builddir/build/BUILD/python-starlette-0.49.1-1.an23.noarch-pyproject-files --output-modules /builddir/build/BUILD/python-starlette-0.49.1-1.an23.noarch-pyproject-modules --buildroot /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch --sitelib /usr/lib/python3.11/site-packages --sitearch /usr/lib64/python3.11/site-packages --python-version 3.11 --pyproject-record /builddir/build/BUILD/python-starlette-0.49.1-1.an23.noarch-pyproject-record --prefix /usr starlette + /usr/bin/find-debuginfo -j80 --strict-build-id -m -i --build-id-seed 0.49.1-1.an23 --unique-debug-suffix -0.49.1-1.an23.noarch --unique-debug-src-base python-starlette-0.49.1-1.an23.noarch --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/starlette-0.49.1 find-debuginfo: starting Extracting debug info from 0 files Creating .debug symlinks for symlinks to ELF files find: 'debug': No such file or directory find-debuginfo: done + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/anolis/brp-ldconfig + COMPRESS='zstd -f --rm -19 -T0' + COMPRESS_EXT=.zst + /usr/lib/rpm/brp-compress + /usr/lib/rpm/anolis/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/brp-remove-la-files + /usr/lib/rpm/anolis/clean_perl + /usr/lib/rpm/anolis/check_elf_files + /usr/lib/rpm/anolis/brp-mangle-shebangs + /usr/lib/rpm/anolis/remove-info-dir + /usr/lib/rpm/anolis/check-desktop-files + env -u SOURCE_DATE_EPOCH /usr/lib/rpm/anolis/brp-python-bytecompile '' 1 0 -j80 Bytecompiling .py files below /builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib/python3.11 using python3.11 Not clamping source mtimes, $SOURCE_DATE_EPOCH not set + /usr/lib/rpm/anolis/brp-python-hardlink Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.C0NhtS + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/anolis/anolis-hardened-ld -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd starlette-0.49.1 + '[' '!' -f /builddir/build/BUILD/python-starlette-0.49.1-1.an23.noarch-pyproject-modules ']' + PATH=/builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib64/python3.11/site-packages:/builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib/python3.11/site-packages + _PYTHONSITE=/builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib64/python3.11/site-packages:/builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib/python3.11/site-packages + PYTHONDONTWRITEBYTECODE=1 + /usr/bin/python3 -sP /usr/lib/rpm/anolis/import_all_modules.py -f /builddir/build/BUILD/python-starlette-0.49.1-1.an23.noarch-pyproject-modules Check import: starlette Check import: starlette.applications Check import: starlette.authentication Check import: starlette.background Check import: starlette.concurrency Check import: starlette.config Check import: starlette.convertors Check import: starlette.datastructures Check import: starlette.endpoints Check import: starlette.exceptions Check import: starlette.formparsers Check import: starlette.middleware Check import: starlette.middleware.authentication Check import: starlette.middleware.base Check import: starlette.middleware.cors Check import: starlette.middleware.errors Check import: starlette.middleware.exceptions Check import: starlette.middleware.gzip Check import: starlette.middleware.httpsredirect Check import: starlette.middleware.sessions Check import: starlette.middleware.trustedhost Check import: starlette.middleware.wsgi Check import: starlette.requests Check import: starlette.responses Check import: starlette.routing Check import: starlette.schemas Check import: starlette.staticfiles Check import: starlette.status Check import: starlette.templating Check import: starlette.testclient Check import: starlette.types Check import: starlette.websockets + k='not test_lifespan_with_on_events' + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/anolis/anolis-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/anolis/anolis-hardened-ld -specs=/usr/lib/rpm/anolis/anolis-annobin-cc1 -Wl,--build-id=sha1 ' + PATH=/builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib64/python3.11/site-packages:/builddir/build/BUILDROOT/python-starlette-0.49.1-1.an23.noarch/usr/lib/python3.11/site-packages + PYTHONDONTWRITEBYTECODE=1 + PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/starlette-0.49.1/.pyproject-builddir' + PYTEST_XDIST_AUTO_NUM_WORKERS=80 + /usr/bin/pytest -W ignore::trio.TrioDeprecationWarning -k 'not test_lifespan_with_on_events' ============================= test session starts ============================== platform linux -- Python 3.11.6, pytest-7.3.1, pluggy-1.0.0 rootdir: /builddir/build/BUILD/starlette-0.49.1 configfile: pyproject.toml plugins: anyio-3.7.0 collected 939 items / 2 deselected / 937 selected tests/test__utils.py ........... [ 1%] tests/test_applications.py ............................................. [ 5%] ......... [ 6%] tests/test_authentication.py ........... [ 8%] tests/test_background.py ........ [ 8%] tests/test_concurrency.py ...... [ 9%] tests/test_config.py ...... [ 10%] tests/test_convertors.py ................ [ 11%] tests/test_datastructures.py .............................. [ 15%] tests/test_endpoints.py .................... [ 17%] tests/test_exceptions.py ....................... [ 19%] tests/test_formparsers.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF..FFFFFFFFFF [ 24%] FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF [ 28%] tests/test_requests.py .........FFFFFFFF................................ [ 33%] ...................................... [ 37%] tests/test_responses.py ................................................ [ 42%] ........................................................................ [ 50%] ... [ 50%] tests/test_routing.py .................................................. [ 55%] ....................................... [ 59%] tests/test_schemas.py ... [ 60%] tests/test_staticfiles.py .............................................. [ 65%] .............. [ 66%] tests/test_status.py ... [ 67%] tests/test_templates.py .................................. [ 70%] tests/test_testclient.py ............................................... [ 75%] . [ 75%] tests/test_websockets.py ............................................... [ 80%] ............................ [ 83%] tests/middleware/test_base.py .........x.x.............................. [ 88%] ................... [ 90%] tests/middleware/test_cors.py .............................. [ 93%] tests/middleware/test_errors.py ............ [ 94%] tests/middleware/test_gzip.py ................ [ 96%] tests/middleware/test_https_redirect.py .. [ 96%] tests/middleware/test_middleware.py .. [ 96%] tests/middleware/test_session.py .............. [ 98%] tests/middleware/test_trusted_host.py ..... [ 98%] tests/middleware/test_wsgi.py ..FF...... [100%] =================================== FAILURES =================================== _____________________ test_multipart_request_data[asyncio] _____________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_data_as0') test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_multipart_request_data(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post("/", data={"some": "data"}, files=FORCE_MULTIPART) tests/test_formparsers.py:153: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ______________________ test_multipart_request_data[trio] _______________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_data_tr0') test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_multipart_request_data(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post("/", data={"some": "data"}, files=FORCE_MULTIPART) tests/test_formparsers.py:153: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ____________________ test_multipart_request_files[asyncio] _____________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_files_a0') test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_multipart_request_files(tmpdir: Path, test_client_factory: TestClientFactory) -> None: path = os.path.join(tmpdir, "test.txt") with open(path, "wb") as file: file.write(b"") client = test_client_factory(app) with open(path, "rb") as f: > response = client.post("/", files={"test": f}) tests/test_formparsers.py:164: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ______________________ test_multipart_request_files[trio] ______________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_files_t0') test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_multipart_request_files(tmpdir: Path, test_client_factory: TestClientFactory) -> None: path = os.path.join(tmpdir, "test.txt") with open(path, "wb") as file: file.write(b"") client = test_client_factory(app) with open(path, "rb") as f: > response = client.post("/", files={"test": f}) tests/test_formparsers.py:164: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ___________ test_multipart_request_files_with_content_type[asyncio] ____________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_files_w0') test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_multipart_request_files_with_content_type(tmpdir: Path, test_client_factory: TestClientFactory) -> None: path = os.path.join(tmpdir, "test.txt") with open(path, "wb") as file: file.write(b"") client = test_client_factory(app) with open(path, "rb") as f: > response = client.post("/", files={"test": ("test.txt", f, "text/plain")}) tests/test_formparsers.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _____________ test_multipart_request_files_with_content_type[trio] _____________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_files_w1') test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_multipart_request_files_with_content_type(tmpdir: Path, test_client_factory: TestClientFactory) -> None: path = os.path.join(tmpdir, "test.txt") with open(path, "wb") as file: file.write(b"") client = test_client_factory(app) with open(path, "rb") as f: > response = client.post("/", files={"test": ("test.txt", f, "text/plain")}) tests/test_formparsers.py:182: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ________________ test_multipart_request_multiple_files[asyncio] ________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_multipl0') test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_multipart_request_multiple_files(tmpdir: Path, test_client_factory: TestClientFactory) -> None: path1 = os.path.join(tmpdir, "test1.txt") with open(path1, "wb") as file: file.write(b"") path2 = os.path.join(tmpdir, "test2.txt") with open(path2, "wb") as file: file.write(b"") client = test_client_factory(app) with open(path1, "rb") as f1, open(path2, "rb") as f2: > response = client.post("/", files={"test1": f1, "test2": ("test2.txt", f2, "text/plain")}) tests/test_formparsers.py:204: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _________________ test_multipart_request_multiple_files[trio] __________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_multipl1') test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_multipart_request_multiple_files(tmpdir: Path, test_client_factory: TestClientFactory) -> None: path1 = os.path.join(tmpdir, "test1.txt") with open(path1, "wb") as file: file.write(b"") path2 = os.path.join(tmpdir, "test2.txt") with open(path2, "wb") as file: file.write(b"") client = test_client_factory(app) with open(path1, "rb") as f1, open(path2, "rb") as f2: > response = client.post("/", files={"test1": f1, "test2": ("test2.txt", f2, "text/plain")}) tests/test_formparsers.py:204: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _________ test_multipart_request_multiple_files_with_headers[asyncio] __________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_multipl2') test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_multipart_request_multiple_files_with_headers(tmpdir: Path, test_client_factory: TestClientFactory) -> None: path1 = os.path.join(tmpdir, "test1.txt") with open(path1, "wb") as file: file.write(b"") path2 = os.path.join(tmpdir, "test2.txt") with open(path2, "wb") as file: file.write(b"") client = test_client_factory(app_with_headers) with open(path1, "rb") as f1, open(path2, "rb") as f2: > response = client.post( "/", files=[ ("test1", (None, f1)), ("test2", ("test2.txt", f2, "text/plain", {"x-custom": "f2"})), ], ) tests/test_formparsers.py:232: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:80: in app_with_headers data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ___________ test_multipart_request_multiple_files_with_headers[trio] ___________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_multipl3') test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_multipart_request_multiple_files_with_headers(tmpdir: Path, test_client_factory: TestClientFactory) -> None: path1 = os.path.join(tmpdir, "test1.txt") with open(path1, "wb") as file: file.write(b"") path2 = os.path.join(tmpdir, "test2.txt") with open(path2, "wb") as file: file.write(b"") client = test_client_factory(app_with_headers) with open(path1, "rb") as f1, open(path2, "rb") as f2: > response = client.post( "/", files=[ ("test1", (None, f1)), ("test2", ("test2.txt", f2, "text/plain", {"x-custom": "f2"})), ], ) tests/test_formparsers.py:232: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:80: in app_with_headers data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError __________________________ test_multi_items[asyncio] ___________________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multi_items_asyncio_0') test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_multi_items(tmpdir: Path, test_client_factory: TestClientFactory) -> None: path1 = os.path.join(tmpdir, "test1.txt") with open(path1, "wb") as file: file.write(b"") path2 = os.path.join(tmpdir, "test2.txt") with open(path2, "wb") as file: file.write(b"") client = test_client_factory(multi_items_app) with open(path1, "rb") as f1, open(path2, "rb") as f2: > response = client.post( "/", data={"test1": "abc"}, files=[("test1", f1), ("test1", ("test2.txt", f2, "text/plain"))], ) tests/test_formparsers.py:269: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:56: in multi_items_app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ____________________________ test_multi_items[trio] ____________________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multi_items_trio_0') test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_multi_items(tmpdir: Path, test_client_factory: TestClientFactory) -> None: path1 = os.path.join(tmpdir, "test1.txt") with open(path1, "wb") as file: file.write(b"") path2 = os.path.join(tmpdir, "test2.txt") with open(path2, "wb") as file: file.write(b"") client = test_client_factory(multi_items_app) with open(path1, "rb") as f1, open(path2, "rb") as f2: > response = client.post( "/", data={"test1": "abc"}, files=[("test1", f1), ("test1", ("test2.txt", f2, "text/plain"))], ) tests/test_formparsers.py:269: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:56: in multi_items_app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _____________ test_multipart_request_mixed_files_and_data[asyncio] _____________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_mixed_f0') test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_multipart_request_mixed_files_and_data(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post( "/", data=( # data b"--a7f7ac8d4e2e437c877bb7b8d7cc549c\r\n" # type: ignore b'Content-Disposition: form-data; name="field0"\r\n\r\n' b"value0\r\n" # file b"--a7f7ac8d4e2e437c877bb7b8d7cc549c\r\n" b'Content-Disposition: form-data; name="file"; filename="file.txt"\r\n' b"Content-Type: text/plain\r\n\r\n" b"\r\n" # data b"--a7f7ac8d4e2e437c877bb7b8d7cc549c\r\n" b'Content-Disposition: form-data; name="field1"\r\n\r\n' b"value1\r\n" b"--a7f7ac8d4e2e437c877bb7b8d7cc549c--\r\n" ), headers={"Content-Type": ("multipart/form-data; boundary=a7f7ac8d4e2e437c877bb7b8d7cc549c")}, ) tests/test_formparsers.py:295: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ______________ test_multipart_request_mixed_files_and_data[trio] _______________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_mixed_f1') test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_multipart_request_mixed_files_and_data(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post( "/", data=( # data b"--a7f7ac8d4e2e437c877bb7b8d7cc549c\r\n" # type: ignore b'Content-Disposition: form-data; name="field0"\r\n\r\n' b"value0\r\n" # file b"--a7f7ac8d4e2e437c877bb7b8d7cc549c\r\n" b'Content-Disposition: form-data; name="file"; filename="file.txt"\r\n' b"Content-Type: text/plain\r\n\r\n" b"\r\n" # data b"--a7f7ac8d4e2e437c877bb7b8d7cc549c\r\n" b'Content-Disposition: form-data; name="field1"\r\n\r\n' b"value1\r\n" b"--a7f7ac8d4e2e437c877bb7b8d7cc549c--\r\n" ), headers={"Content-Type": ("multipart/form-data; boundary=a7f7ac8d4e2e437c877bb7b8d7cc549c")}, ) tests/test_formparsers.py:295: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ___ test_multipart_request_large_file_rollover_in_background_thread[asyncio] ___ mock_spooled_temporary_file = None test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_multipart_request_large_file_rollover_in_background_thread( mock_spooled_temporary_file: None, test_client_factory: TestClientFactory ) -> None: """Test that Spooled file rollovers happen in background threads.""" data = BytesIO(b" " * (MultiPartParser.spool_max_size + 1)) client = test_client_factory(app_monitor_thread) > response = client.post("/", files=[("test_large", data)]) tests/test_formparsers.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:120: in app_monitor_thread await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ____ test_multipart_request_large_file_rollover_in_background_thread[trio] _____ mock_spooled_temporary_file = None test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_multipart_request_large_file_rollover_in_background_thread( mock_spooled_temporary_file: None, test_client_factory: TestClientFactory ) -> None: """Test that Spooled file rollovers happen in background threads.""" data = BytesIO(b" " * (MultiPartParser.spool_max_size + 1)) client = test_client_factory(app_monitor_thread) > response = client.post("/", files=[("test_large", data)]) tests/test_formparsers.py:356: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:120: in app_monitor_thread await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError __________ test_multipart_request_with_charset_for_filename[asyncio] ___________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_with_ch0') test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_multipart_request_with_charset_for_filename(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post( "/", data=( # file b"--a7f7ac8d4e2e437c877bb7b8d7cc549c\r\n" # type: ignore b'Content-Disposition: form-data; name="file"; filename="\xe6\x96\x87\xe6\x9b\xb8.txt"\r\n' b"Content-Type: text/plain\r\n\r\n" b"\r\n" b"--a7f7ac8d4e2e437c877bb7b8d7cc549c--\r\n" ), headers={"Content-Type": ("multipart/form-data; charset=utf-8; boundary=a7f7ac8d4e2e437c877bb7b8d7cc549c")}, ) tests/test_formparsers.py:370: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ____________ test_multipart_request_with_charset_for_filename[trio] ____________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_with_ch1') test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_multipart_request_with_charset_for_filename(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post( "/", data=( # file b"--a7f7ac8d4e2e437c877bb7b8d7cc549c\r\n" # type: ignore b'Content-Disposition: form-data; name="file"; filename="\xe6\x96\x87\xe6\x9b\xb8.txt"\r\n' b"Content-Type: text/plain\r\n\r\n" b"\r\n" b"--a7f7ac8d4e2e437c877bb7b8d7cc549c--\r\n" ), headers={"Content-Type": ("multipart/form-data; charset=utf-8; boundary=a7f7ac8d4e2e437c877bb7b8d7cc549c")}, ) tests/test_formparsers.py:370: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _________ test_multipart_request_without_charset_for_filename[asyncio] _________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_without0') test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_multipart_request_without_charset_for_filename(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post( "/", data=( # file b"--a7f7ac8d4e2e437c877bb7b8d7cc549c\r\n" # type: ignore b'Content-Disposition: form-data; name="file"; filename="\xe7\x94\xbb\xe5\x83\x8f.jpg"\r\n' b"Content-Type: image/jpeg\r\n\r\n" b"\r\n" b"--a7f7ac8d4e2e437c877bb7b8d7cc549c--\r\n" ), headers={"Content-Type": ("multipart/form-data; boundary=a7f7ac8d4e2e437c877bb7b8d7cc549c")}, ) tests/test_formparsers.py:394: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError __________ test_multipart_request_without_charset_for_filename[trio] ___________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_without1') test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_multipart_request_without_charset_for_filename(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post( "/", data=( # file b"--a7f7ac8d4e2e437c877bb7b8d7cc549c\r\n" # type: ignore b'Content-Disposition: form-data; name="file"; filename="\xe7\x94\xbb\xe5\x83\x8f.jpg"\r\n' b"Content-Type: image/jpeg\r\n\r\n" b"\r\n" b"--a7f7ac8d4e2e437c877bb7b8d7cc549c--\r\n" ), headers={"Content-Type": ("multipart/form-data; boundary=a7f7ac8d4e2e437c877bb7b8d7cc549c")}, ) tests/test_formparsers.py:394: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ______________ test_multipart_request_with_encoded_value[asyncio] ______________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_with_en0') test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_multipart_request_with_encoded_value(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post( "/", data=( b"--20b303e711c4ab8c443184ac833ab00f\r\n" # type: ignore b"Content-Disposition: form-data; " b'name="value"\r\n\r\n' b"Transf\xc3\xa9rer\r\n" b"--20b303e711c4ab8c443184ac833ab00f--\r\n" ), headers={"Content-Type": ("multipart/form-data; charset=utf-8; boundary=20b303e711c4ab8c443184ac833ab00f")}, ) tests/test_formparsers.py:418: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _______________ test_multipart_request_with_encoded_value[trio] ________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_request_with_en1') test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_multipart_request_with_encoded_value(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post( "/", data=( b"--20b303e711c4ab8c443184ac833ab00f\r\n" # type: ignore b"Content-Disposition: form-data; " b'name="value"\r\n\r\n' b"Transf\xc3\xa9rer\r\n" b"--20b303e711c4ab8c443184ac833ab00f--\r\n" ), headers={"Content-Type": ("multipart/form-data; charset=utf-8; boundary=20b303e711c4ab8c443184ac833ab00f")}, ) tests/test_formparsers.py:418: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ____________________ test_urlencoded_request_data[asyncio] _____________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_urlencoded_request_data_a0') test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_urlencoded_request_data(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post("/", data={"some": "data"}) tests/test_formparsers.py:434: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ______________________ test_urlencoded_request_data[trio] ______________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_urlencoded_request_data_t0') test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_urlencoded_request_data(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post("/", data={"some": "data"}) tests/test_formparsers.py:434: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ________________________ test_no_request_data[asyncio] _________________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_no_request_data_asyncio_0') test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_no_request_data(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post("/") tests/test_formparsers.py:440: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError __________________________ test_no_request_data[trio] __________________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_no_request_data_trio_0') test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_no_request_data(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post("/") tests/test_formparsers.py:440: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError __________________ test_urlencoded_percent_encoding[asyncio] ___________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_urlencoded_percent_encodi0') test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_urlencoded_percent_encoding(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post("/", data={"some": "da ta"}) tests/test_formparsers.py:446: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ____________________ test_urlencoded_percent_encoding[trio] ____________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_urlencoded_percent_encodi1') test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_urlencoded_percent_encoding(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post("/", data={"some": "da ta"}) tests/test_formparsers.py:446: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ________________ test_urlencoded_percent_encoding_keys[asyncio] ________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_urlencoded_percent_encodi2') test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_urlencoded_percent_encoding_keys(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post("/", data={"so me": "data"}) tests/test_formparsers.py:452: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _________________ test_urlencoded_percent_encoding_keys[trio] __________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_urlencoded_percent_encodi3') test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_urlencoded_percent_encoding_keys(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.post("/", data={"so me": "data"}) tests/test_formparsers.py:452: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _____________ test_urlencoded_multi_field_app_reads_body[asyncio] ______________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_urlencoded_multi_field_ap0') test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_urlencoded_multi_field_app_reads_body(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app_read_body) > response = client.post("/", data={"some": "data", "second": "key pair"}) tests/test_formparsers.py:458: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:103: in app_read_body data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _______________ test_urlencoded_multi_field_app_reads_body[trio] _______________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_urlencoded_multi_field_ap1') test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_urlencoded_multi_field_app_reads_body(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app_read_body) > response = client.post("/", data={"some": "data", "second": "key pair"}) tests/test_formparsers.py:458: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:103: in app_read_body data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ______________ test_multipart_multi_field_app_reads_body[asyncio] ______________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_multi_field_app0') test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_multipart_multi_field_app_reads_body(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app_read_body) > response = client.post("/", data={"some": "data", "second": "key pair"}, files=FORCE_MULTIPART) tests/test_formparsers.py:464: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:103: in app_read_body data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _______________ test_multipart_multi_field_app_reads_body[trio] ________________ tmpdir = local('/tmp/pytest-of-mockbuild/pytest-0/test_multipart_multi_field_app1') test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_multipart_multi_field_app_reads_body(tmpdir: Path, test_client_factory: TestClientFactory) -> None: client = test_client_factory(app_read_body) > response = client.post("/", data={"some": "data", "second": "key pair"}, files=FORCE_MULTIPART) tests/test_formparsers.py:464: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:103: in app_read_body data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError __________ test_missing_boundary_parameter[asyncio-app-expectation0] ___________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba63d0> test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_missing_boundary_parameter( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) with expectation: > res = client.post( "/", data=( # file b'Content-Disposition: form-data; name="file"; filename="\xe6\x96\x87\xe6\x9b\xb8.txt"\r\n' # type: ignore b"Content-Type: text/plain\r\n\r\n" b"\r\n" ), headers={"Content-Type": "multipart/form-data; charset=utf-8"}, ) tests/test_formparsers.py:492: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError __________ test_missing_boundary_parameter[asyncio-app1-expectation1] __________ app = expectation = test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_missing_boundary_parameter( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) with expectation: > res = client.post( "/", data=( # file b'Content-Disposition: form-data; name="file"; filename="\xe6\x96\x87\xe6\x9b\xb8.txt"\r\n' # type: ignore b"Content-Type: text/plain\r\n\r\n" b"\r\n" ), headers={"Content-Type": "multipart/form-data; charset=utf-8"}, ) tests/test_formparsers.py:492: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ____________ test_missing_boundary_parameter[trio-app-expectation0] ____________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba63d0> test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_missing_boundary_parameter( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) with expectation: > res = client.post( "/", data=( # file b'Content-Disposition: form-data; name="file"; filename="\xe6\x96\x87\xe6\x9b\xb8.txt"\r\n' # type: ignore b"Content-Type: text/plain\r\n\r\n" b"\r\n" ), headers={"Content-Type": "multipart/form-data; charset=utf-8"}, ) tests/test_formparsers.py:492: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ___________ test_missing_boundary_parameter[trio-app1-expectation1] ____________ app = expectation = test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_missing_boundary_parameter( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) with expectation: > res = client.post( "/", data=( # file b'Content-Disposition: form-data; name="file"; filename="\xe6\x96\x87\xe6\x9b\xb8.txt"\r\n' # type: ignore b"Content-Type: text/plain\r\n\r\n" b"\r\n" ), headers={"Content-Type": "multipart/form-data; charset=utf-8"}, ) tests/test_formparsers.py:492: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _ test_missing_name_parameter_on_content_disposition[asyncio-app-expectation0] _ app = expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba5350> test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_missing_name_parameter_on_content_disposition( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) with expectation: > res = client.post( "/", data=( # data b"--a7f7ac8d4e2e437c877bb7b8d7cc549c\r\n" # type: ignore b'Content-Disposition: form-data; ="field0"\r\n\r\n' b"value0\r\n" ), headers={"Content-Type": ("multipart/form-data; boundary=a7f7ac8d4e2e437c877bb7b8d7cc549c")}, ) tests/test_formparsers.py:520: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _ test_missing_name_parameter_on_content_disposition[asyncio-app1-expectation1] _ app = expectation = test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_missing_name_parameter_on_content_disposition( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) with expectation: > res = client.post( "/", data=( # data b"--a7f7ac8d4e2e437c877bb7b8d7cc549c\r\n" # type: ignore b'Content-Disposition: form-data; ="field0"\r\n\r\n' b"value0\r\n" ), headers={"Content-Type": ("multipart/form-data; boundary=a7f7ac8d4e2e437c877bb7b8d7cc549c")}, ) tests/test_formparsers.py:520: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError __ test_missing_name_parameter_on_content_disposition[trio-app-expectation0] ___ app = expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba5350> test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_missing_name_parameter_on_content_disposition( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) with expectation: > res = client.post( "/", data=( # data b"--a7f7ac8d4e2e437c877bb7b8d7cc549c\r\n" # type: ignore b'Content-Disposition: form-data; ="field0"\r\n\r\n' b"value0\r\n" ), headers={"Content-Type": ("multipart/form-data; boundary=a7f7ac8d4e2e437c877bb7b8d7cc549c")}, ) tests/test_formparsers.py:520: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError __ test_missing_name_parameter_on_content_disposition[trio-app1-expectation1] __ app = expectation = test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_missing_name_parameter_on_content_disposition( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) with expectation: > res = client.post( "/", data=( # data b"--a7f7ac8d4e2e437c877bb7b8d7cc549c\r\n" # type: ignore b'Content-Disposition: form-data; ="field0"\r\n\r\n' b"value0\r\n" ), headers={"Content-Type": ("multipart/form-data; boundary=a7f7ac8d4e2e437c877bb7b8d7cc549c")}, ) tests/test_formparsers.py:520: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _____________ test_too_many_fields_raise[asyncio-app-expectation0] _____________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba5750> test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_too_many_fields_raise( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:552: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ____________ test_too_many_fields_raise[asyncio-app1-expectation1] _____________ app = expectation = test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_too_many_fields_raise( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:552: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ______________ test_too_many_fields_raise[trio-app-expectation0] _______________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba5750> test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_too_many_fields_raise( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:552: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ______________ test_too_many_fields_raise[trio-app1-expectation1] ______________ app = expectation = test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_too_many_fields_raise( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:552: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _____________ test_too_many_files_raise[asyncio-app-expectation0] ______________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba6390> test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_too_many_files_raise( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}"; filename="F{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:579: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _____________ test_too_many_files_raise[asyncio-app1-expectation1] _____________ app = expectation = test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_too_many_files_raise( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}"; filename="F{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:579: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _______________ test_too_many_files_raise[trio-app-expectation0] _______________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba6390> test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_too_many_files_raise( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}"; filename="F{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:579: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ______________ test_too_many_files_raise[trio-app1-expectation1] _______________ app = expectation = test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_too_many_files_raise( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}"; filename="F{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:579: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _______ test_too_many_files_single_field_raise[asyncio-app-expectation0] _______ app = expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba5e10> test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_too_many_files_single_field_raise( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): # This uses the same field name "N" for all files, equivalent to a # multifile upload form field fields.append(f'--B\r\nContent-Disposition: form-data; name="N"; filename="F{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:608: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ______ test_too_many_files_single_field_raise[asyncio-app1-expectation1] _______ app = expectation = test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_too_many_files_single_field_raise( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): # This uses the same field name "N" for all files, equivalent to a # multifile upload form field fields.append(f'--B\r\nContent-Disposition: form-data; name="N"; filename="F{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:608: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ________ test_too_many_files_single_field_raise[trio-app-expectation0] _________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba5e10> test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_too_many_files_single_field_raise( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): # This uses the same field name "N" for all files, equivalent to a # multifile upload form field fields.append(f'--B\r\nContent-Disposition: form-data; name="N"; filename="F{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:608: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ________ test_too_many_files_single_field_raise[trio-app1-expectation1] ________ app = expectation = test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_too_many_files_single_field_raise( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): # This uses the same field name "N" for all files, equivalent to a # multifile upload form field fields.append(f'--B\r\nContent-Disposition: form-data; name="N"; filename="F{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:608: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ________ test_too_many_files_and_fields_raise[asyncio-app-expectation0] ________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba6ad0> test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_too_many_files_and_fields_raise( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append(f'--B\r\nContent-Disposition: form-data; name="F{i}"; filename="F{i}";\r\n\r\n\r\n') fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:636: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _______ test_too_many_files_and_fields_raise[asyncio-app1-expectation1] ________ app = expectation = test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_too_many_files_and_fields_raise( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append(f'--B\r\nContent-Disposition: form-data; name="F{i}"; filename="F{i}";\r\n\r\n\r\n') fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:636: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _________ test_too_many_files_and_fields_raise[trio-app-expectation0] __________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba6ad0> test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_too_many_files_and_fields_raise( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append(f'--B\r\nContent-Disposition: form-data; name="F{i}"; filename="F{i}";\r\n\r\n\r\n') fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:636: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _________ test_too_many_files_and_fields_raise[trio-app1-expectation1] _________ app = expectation = test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_too_many_files_and_fields_raise( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append(f'--B\r\nContent-Disposition: form-data; name="F{i}"; filename="F{i}";\r\n\r\n\r\n') fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:636: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _____ test_max_fields_is_customizable_low_raises[asyncio-app-expectation0] _____ app = .app at 0xffff83f2f600> expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba7ad0> test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (make_app_max_parts(max_fields=1), pytest.raises(MultiPartException)), ( Starlette(routes=[Mount("/", app=make_app_max_parts(max_fields=1))]), does_not_raise(), ), ], ) def test_max_fields_is_customizable_low_raises( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(2): fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:666: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:131: in app data = await request.form(max_files=max_files, max_fields=max_fields, max_part_size=max_part_size) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ____ test_max_fields_is_customizable_low_raises[asyncio-app1-expectation1] _____ app = expectation = test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (make_app_max_parts(max_fields=1), pytest.raises(MultiPartException)), ( Starlette(routes=[Mount("/", app=make_app_max_parts(max_fields=1))]), does_not_raise(), ), ], ) def test_max_fields_is_customizable_low_raises( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(2): fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:666: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:131: in app data = await request.form(max_files=max_files, max_fields=max_fields, max_part_size=max_part_size) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ______ test_max_fields_is_customizable_low_raises[trio-app-expectation0] _______ app = .app at 0xffff83f2f600> expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba7ad0> test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (make_app_max_parts(max_fields=1), pytest.raises(MultiPartException)), ( Starlette(routes=[Mount("/", app=make_app_max_parts(max_fields=1))]), does_not_raise(), ), ], ) def test_max_fields_is_customizable_low_raises( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(2): fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:666: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:131: in app data = await request.form(max_files=max_files, max_fields=max_fields, max_part_size=max_part_size) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ______ test_max_fields_is_customizable_low_raises[trio-app1-expectation1] ______ app = expectation = test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (make_app_max_parts(max_fields=1), pytest.raises(MultiPartException)), ( Starlette(routes=[Mount("/", app=make_app_max_parts(max_fields=1))]), does_not_raise(), ), ], ) def test_max_fields_is_customizable_low_raises( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(2): fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:666: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:131: in app data = await request.form(max_files=max_files, max_fields=max_fields, max_part_size=max_part_size) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _____ test_max_files_is_customizable_low_raises[asyncio-app-expectation0] ______ app = .app at 0xffff83f2f920> expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba43d0> test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (make_app_max_parts(max_files=1), pytest.raises(MultiPartException)), ( Starlette(routes=[Mount("/", app=make_app_max_parts(max_files=1))]), does_not_raise(), ), ], ) def test_max_files_is_customizable_low_raises( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(2): fields.append(f'--B\r\nContent-Disposition: form-data; name="F{i}"; filename="F{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:696: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:131: in app data = await request.form(max_files=max_files, max_fields=max_fields, max_part_size=max_part_size) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _____ test_max_files_is_customizable_low_raises[asyncio-app1-expectation1] _____ app = expectation = test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (make_app_max_parts(max_files=1), pytest.raises(MultiPartException)), ( Starlette(routes=[Mount("/", app=make_app_max_parts(max_files=1))]), does_not_raise(), ), ], ) def test_max_files_is_customizable_low_raises( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(2): fields.append(f'--B\r\nContent-Disposition: form-data; name="F{i}"; filename="F{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:696: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:131: in app data = await request.form(max_files=max_files, max_fields=max_fields, max_part_size=max_part_size) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _______ test_max_files_is_customizable_low_raises[trio-app-expectation0] _______ app = .app at 0xffff83f2f920> expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba43d0> test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (make_app_max_parts(max_files=1), pytest.raises(MultiPartException)), ( Starlette(routes=[Mount("/", app=make_app_max_parts(max_files=1))]), does_not_raise(), ), ], ) def test_max_files_is_customizable_low_raises( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(2): fields.append(f'--B\r\nContent-Disposition: form-data; name="F{i}"; filename="F{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:696: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:131: in app data = await request.form(max_files=max_files, max_fields=max_fields, max_part_size=max_part_size) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ______ test_max_files_is_customizable_low_raises[trio-app1-expectation1] _______ app = expectation = test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (make_app_max_parts(max_files=1), pytest.raises(MultiPartException)), ( Starlette(routes=[Mount("/", app=make_app_max_parts(max_files=1))]), does_not_raise(), ), ], ) def test_max_files_is_customizable_low_raises( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(2): fields.append(f'--B\r\nContent-Disposition: form-data; name="F{i}"; filename="F{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") with expectation: > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:696: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:131: in app data = await request.form(max_files=max_files, max_fields=max_fields, max_part_size=max_part_size) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ________________ test_max_fields_is_customizable_high[asyncio] _________________ test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_max_fields_is_customizable_high(test_client_factory: TestClientFactory) -> None: client = test_client_factory(make_app_max_parts(max_fields=2000, max_files=2000)) fields = [] for i in range(2000): fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}";\r\n\r\n\r\n') fields.append(f'--B\r\nContent-Disposition: form-data; name="F{i}"; filename="F{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") data += b"--B--\r\n" > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:713: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:131: in app data = await request.form(max_files=max_files, max_fields=max_fields, max_part_size=max_part_size) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError __________________ test_max_fields_is_customizable_high[trio] __________________ test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_max_fields_is_customizable_high(test_client_factory: TestClientFactory) -> None: client = test_client_factory(make_app_max_parts(max_fields=2000, max_files=2000)) fields = [] for i in range(2000): fields.append(f'--B\r\nContent-Disposition: form-data; name="N{i}";\r\n\r\n\r\n') fields.append(f'--B\r\nContent-Disposition: form-data; name="F{i}"; filename="F{i}";\r\n\r\n\r\n') data = "".join(fields).encode("utf-8") data += b"--B--\r\n" > res = client.post( "/", data=data, # type: ignore headers={"Content-Type": ("multipart/form-data; boundary=B")}, ) tests/test_formparsers.py:713: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:131: in app data = await request.form(max_files=max_files, max_fields=max_fields, max_part_size=max_part_size) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError __________ test_max_part_size_exceeds_limit[asyncio-app-expectation0] __________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba4dd0> test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_max_part_size_exceeds_limit( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) boundary = "------------------------4K1ON9fZkj9uCUmqLHRbbR" multipart_data = ( f"--{boundary}\r\n" f'Content-Disposition: form-data; name="small"\r\n\r\n' "small content\r\n" f"--{boundary}\r\n" f'Content-Disposition: form-data; name="large"\r\n\r\n' + ("x" * 1024 * 1024 + "x") # 1MB + 1 byte of data + "\r\n" f"--{boundary}--\r\n" ).encode("utf-8") headers = { "Content-Type": f"multipart/form-data; boundary={boundary}", "Transfer-Encoding": "chunked", } with expectation: > response = client.post("/", data=multipart_data, headers=headers) # type: ignore tests/test_formparsers.py:761: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _________ test_max_part_size_exceeds_limit[asyncio-app1-expectation1] __________ app = expectation = test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_max_part_size_exceeds_limit( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) boundary = "------------------------4K1ON9fZkj9uCUmqLHRbbR" multipart_data = ( f"--{boundary}\r\n" f'Content-Disposition: form-data; name="small"\r\n\r\n' "small content\r\n" f"--{boundary}\r\n" f'Content-Disposition: form-data; name="large"\r\n\r\n' + ("x" * 1024 * 1024 + "x") # 1MB + 1 byte of data + "\r\n" f"--{boundary}--\r\n" ).encode("utf-8") headers = { "Content-Type": f"multipart/form-data; boundary={boundary}", "Transfer-Encoding": "chunked", } with expectation: > response = client.post("/", data=multipart_data, headers=headers) # type: ignore tests/test_formparsers.py:761: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ___________ test_max_part_size_exceeds_limit[trio-app-expectation0] ____________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba4dd0> test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_max_part_size_exceeds_limit( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) boundary = "------------------------4K1ON9fZkj9uCUmqLHRbbR" multipart_data = ( f"--{boundary}\r\n" f'Content-Disposition: form-data; name="small"\r\n\r\n' "small content\r\n" f"--{boundary}\r\n" f'Content-Disposition: form-data; name="large"\r\n\r\n' + ("x" * 1024 * 1024 + "x") # 1MB + 1 byte of data + "\r\n" f"--{boundary}--\r\n" ).encode("utf-8") headers = { "Content-Type": f"multipart/form-data; boundary={boundary}", "Transfer-Encoding": "chunked", } with expectation: > response = client.post("/", data=multipart_data, headers=headers) # type: ignore tests/test_formparsers.py:761: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ___________ test_max_part_size_exceeds_limit[trio-app1-expectation1] ___________ app = expectation = test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (app, pytest.raises(MultiPartException)), (Starlette(routes=[Mount("/", app=app)]), does_not_raise()), ], ) def test_max_part_size_exceeds_limit( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) boundary = "------------------------4K1ON9fZkj9uCUmqLHRbbR" multipart_data = ( f"--{boundary}\r\n" f'Content-Disposition: form-data; name="small"\r\n\r\n' "small content\r\n" f"--{boundary}\r\n" f'Content-Disposition: form-data; name="large"\r\n\r\n' + ("x" * 1024 * 1024 + "x") # 1MB + 1 byte of data + "\r\n" f"--{boundary}--\r\n" ).encode("utf-8") headers = { "Content-Type": f"multipart/form-data; boundary={boundary}", "Transfer-Encoding": "chunked", } with expectation: > response = client.post("/", data=multipart_data, headers=headers) # type: ignore tests/test_formparsers.py:761: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:36: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ______ test_max_part_size_exceeds_custom_limit[asyncio-app-expectation0] _______ app = .app at 0xffff83f2fc40> expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba4d90> test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (make_app_max_parts(max_part_size=1024 * 10), pytest.raises(MultiPartException)), ( Starlette(routes=[Mount("/", app=make_app_max_parts(max_part_size=1024 * 10))]), does_not_raise(), ), ], ) def test_max_part_size_exceeds_custom_limit( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) boundary = "------------------------4K1ON9fZkj9uCUmqLHRbbR" multipart_data = ( f"--{boundary}\r\n" f'Content-Disposition: form-data; name="small"\r\n\r\n' "small content\r\n" f"--{boundary}\r\n" f'Content-Disposition: form-data; name="large"\r\n\r\n' + ("x" * 1024 * 10 + "x") # 1MB + 1 byte of data + "\r\n" f"--{boundary}--\r\n" ).encode("utf-8") headers = { "Content-Type": f"multipart/form-data; boundary={boundary}", "Transfer-Encoding": "chunked", } with expectation: > response = client.post("/", content=multipart_data, headers=headers) tests/test_formparsers.py:801: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:131: in app data = await request.form(max_files=max_files, max_fields=max_fields, max_part_size=max_part_size) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ______ test_max_part_size_exceeds_custom_limit[asyncio-app1-expectation1] ______ app = expectation = test_client_factory = functools.partial(, backend='asyncio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (make_app_max_parts(max_part_size=1024 * 10), pytest.raises(MultiPartException)), ( Starlette(routes=[Mount("/", app=make_app_max_parts(max_part_size=1024 * 10))]), does_not_raise(), ), ], ) def test_max_part_size_exceeds_custom_limit( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) boundary = "------------------------4K1ON9fZkj9uCUmqLHRbbR" multipart_data = ( f"--{boundary}\r\n" f'Content-Disposition: form-data; name="small"\r\n\r\n' "small content\r\n" f"--{boundary}\r\n" f'Content-Disposition: form-data; name="large"\r\n\r\n' + ("x" * 1024 * 10 + "x") # 1MB + 1 byte of data + "\r\n" f"--{boundary}--\r\n" ).encode("utf-8") headers = { "Content-Type": f"multipart/form-data; boundary={boundary}", "Transfer-Encoding": "chunked", } with expectation: > response = client.post("/", content=multipart_data, headers=headers) tests/test_formparsers.py:801: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:131: in app data = await request.form(max_files=max_files, max_fields=max_fields, max_part_size=max_part_size) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ________ test_max_part_size_exceeds_custom_limit[trio-app-expectation0] ________ app = .app at 0xffff83f2fc40> expectation = <_pytest.python_api.RaisesContext object at 0xffff83ba4d90> test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (make_app_max_parts(max_part_size=1024 * 10), pytest.raises(MultiPartException)), ( Starlette(routes=[Mount("/", app=make_app_max_parts(max_part_size=1024 * 10))]), does_not_raise(), ), ], ) def test_max_part_size_exceeds_custom_limit( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) boundary = "------------------------4K1ON9fZkj9uCUmqLHRbbR" multipart_data = ( f"--{boundary}\r\n" f'Content-Disposition: form-data; name="small"\r\n\r\n' "small content\r\n" f"--{boundary}\r\n" f'Content-Disposition: form-data; name="large"\r\n\r\n' + ("x" * 1024 * 10 + "x") # 1MB + 1 byte of data + "\r\n" f"--{boundary}--\r\n" ).encode("utf-8") headers = { "Content-Type": f"multipart/form-data; boundary={boundary}", "Transfer-Encoding": "chunked", } with expectation: > response = client.post("/", content=multipart_data, headers=headers) tests/test_formparsers.py:801: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_formparsers.py:131: in app data = await request.form(max_files=max_files, max_fields=max_fields, max_part_size=max_part_size) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError _______ test_max_part_size_exceeds_custom_limit[trio-app1-expectation1] ________ app = expectation = test_client_factory = functools.partial(, backend='trio', backend_options={}) @pytest.mark.parametrize( "app,expectation", [ (make_app_max_parts(max_part_size=1024 * 10), pytest.raises(MultiPartException)), ( Starlette(routes=[Mount("/", app=make_app_max_parts(max_part_size=1024 * 10))]), does_not_raise(), ), ], ) def test_max_part_size_exceeds_custom_limit( app: ASGIApp, expectation: AbstractContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) boundary = "------------------------4K1ON9fZkj9uCUmqLHRbbR" multipart_data = ( f"--{boundary}\r\n" f'Content-Disposition: form-data; name="small"\r\n\r\n' "small content\r\n" f"--{boundary}\r\n" f'Content-Disposition: form-data; name="large"\r\n\r\n' + ("x" * 1024 * 10 + "x") # 1MB + 1 byte of data + "\r\n" f"--{boundary}--\r\n" ).encode("utf-8") headers = { "Content-Type": f"multipart/form-data; boundary={boundary}", "Transfer-Encoding": "chunked", } with expectation: > response = client.post("/", content=multipart_data, headers=headers) tests/test_formparsers.py:801: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval starlette/applications.py:113: in __call__ await self.middleware_stack(scope, receive, send) starlette/middleware/errors.py:186: in __call__ raise exc starlette/middleware/errors.py:164: in __call__ await self.app(scope, receive, _send) starlette/middleware/exceptions.py:63: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:53: in wrapped_app raise exc starlette/_exception_handler.py:42: in wrapped_app await app(scope, receive, sender) starlette/routing.py:716: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:736: in app await route.handle(scope, receive, send) starlette/routing.py:462: in handle await self.app(scope, receive, send) tests/test_formparsers.py:131: in app data = await request.form(max_files=max_files, max_fields=max_fields, max_part_size=max_part_size) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError __________________________ test_request_body[asyncio] __________________________ test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_request_body(test_client_factory: TestClientFactory) -> None: async def app(scope: Scope, receive: Receive, send: Send) -> None: request = Request(scope, receive) body = await request.body() response = JSONResponse({"body": body.decode()}) await response(scope, receive, send) client = test_client_factory(app) response = client.get("/") assert response.json() == {"body": ""} response = client.post("/", json={"a": "123"}) > assert response.json() == {"body": '{"a":"123"}'} E assert {'body': '{"a": "123"}'} == {'body': '{"a":"123"}'} E Differing items: E {'body': '{"a": "123"}'} != {'body': '{"a":"123"}'} E Use -v to get more diff tests/test_requests.py:95: AssertionError ___________________________ test_request_body[trio] ____________________________ test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_request_body(test_client_factory: TestClientFactory) -> None: async def app(scope: Scope, receive: Receive, send: Send) -> None: request = Request(scope, receive) body = await request.body() response = JSONResponse({"body": body.decode()}) await response(scope, receive, send) client = test_client_factory(app) response = client.get("/") assert response.json() == {"body": ""} response = client.post("/", json={"a": "123"}) > assert response.json() == {"body": '{"a":"123"}'} E assert {'body': '{"a": "123"}'} == {'body': '{"a":"123"}'} E Differing items: E {'body': '{"a": "123"}'} != {'body': '{"a":"123"}'} E Use -v to get more diff tests/test_requests.py:95: AssertionError _________________________ test_request_stream[asyncio] _________________________ test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_request_stream(test_client_factory: TestClientFactory) -> None: async def app(scope: Scope, receive: Receive, send: Send) -> None: request = Request(scope, receive) body = b"" async for chunk in request.stream(): body += chunk response = JSONResponse({"body": body.decode()}) await response(scope, receive, send) client = test_client_factory(app) response = client.get("/") assert response.json() == {"body": ""} response = client.post("/", json={"a": "123"}) > assert response.json() == {"body": '{"a":"123"}'} E assert {'body': '{"a": "123"}'} == {'body': '{"a":"123"}'} E Differing items: E {'body': '{"a": "123"}'} != {'body': '{"a":"123"}'} E Use -v to get more diff tests/test_requests.py:116: AssertionError __________________________ test_request_stream[trio] ___________________________ test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_request_stream(test_client_factory: TestClientFactory) -> None: async def app(scope: Scope, receive: Receive, send: Send) -> None: request = Request(scope, receive) body = b"" async for chunk in request.stream(): body += chunk response = JSONResponse({"body": body.decode()}) await response(scope, receive, send) client = test_client_factory(app) response = client.get("/") assert response.json() == {"body": ""} response = client.post("/", json={"a": "123"}) > assert response.json() == {"body": '{"a":"123"}'} E assert {'body': '{"a": "123"}'} == {'body': '{"a":"123"}'} E Differing items: E {'body': '{"a": "123"}'} != {'body': '{"a":"123"}'} E Use -v to get more diff tests/test_requests.py:116: AssertionError ____________________ test_request_form_urlencoded[asyncio] _____________________ test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_request_form_urlencoded(test_client_factory: TestClientFactory) -> None: async def app(scope: Scope, receive: Receive, send: Send) -> None: request = Request(scope, receive) form = await request.form() response = JSONResponse({"form": dict(form)}) await response(scope, receive, send) client = test_client_factory(app) > response = client.post("/", data={"abc": "123 @"}) tests/test_requests.py:131: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_requests.py:125: in app form = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ______________________ test_request_form_urlencoded[trio] ______________________ test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_request_form_urlencoded(test_client_factory: TestClientFactory) -> None: async def app(scope: Scope, receive: Receive, send: Send) -> None: request = Request(scope, receive) form = await request.form() response = JSONResponse({"form": dict(form)}) await response(scope, receive, send) client = test_client_factory(app) > response = client.post("/", data={"abc": "123 @"}) tests/test_requests.py:131: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_requests.py:125: in app form = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError __________________ test_request_form_context_manager[asyncio] __________________ test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_request_form_context_manager(test_client_factory: TestClientFactory) -> None: async def app(scope: Scope, receive: Receive, send: Send) -> None: request = Request(scope, receive) async with request.form() as form: response = JSONResponse({"form": dict(form)}) await response(scope, receive, send) client = test_client_factory(app) > response = client.post("/", data={"abc": "123 @"}) tests/test_requests.py:144: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:456: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_requests.py:138: in app async with request.form() as form: starlette/_utils.py:68: in __aenter__ self.entered = await self.aw _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ___________________ test_request_form_context_manager[trio] ____________________ test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_request_form_context_manager(test_client_factory: TestClientFactory) -> None: async def app(scope: Scope, receive: Receive, send: Send) -> None: request = Request(scope, receive) async with request.form() as form: response = JSONResponse({"form": dict(form)}) await response(scope, receive, send) client = test_client_factory(app) > response = client.post("/", data={"abc": "123 @"}) tests/test_requests.py:144: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:552: in post return super().post( /usr/lib/python3.11/site-packages/httpx/_client.py:1132: in post return self.request( starlette/testclient.py:451: in request return super().request( /usr/lib/python3.11/site-packages/httpx/_client.py:814: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.11/site-packages/httpx/_client.py:901: in send response = self._send_handling_auth( /usr/lib/python3.11/site-packages/httpx/_client.py:929: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.11/site-packages/httpx/_client.py:966: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.11/site-packages/httpx/_client.py:1002: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:354: in handle_request raise exc starlette/testclient.py:351: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.11/site-packages/anyio/from_thread.py:277: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.11/concurrent/futures/_base.py:449: in result return self.__get_result() /usr/lib64/python3.11/concurrent/futures/_base.py:401: in __get_result raise self._exception /usr/lib/python3.11/site-packages/anyio/from_thread.py:217: in _call_func retval = await retval tests/test_requests.py:138: in app async with request.form() as form: starlette/_utils.py:68: in __aenter__ self.entered = await self.aw _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 * 1024, ) -> FormData: if self._form is None: # pragma: no branch > assert parse_options_header is not None, ( "The `python-multipart` library must be installed to use form parsing." ) E AssertionError: The `python-multipart` library must be installed to use form parsing. starlette/requests.py:262: AssertionError ___________________________ test_wsgi_post[asyncio] ____________________________ test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_wsgi_post(test_client_factory: TestClientFactory) -> None: app = WSGIMiddleware(echo_body) client = test_client_factory(app) response = client.post("/", json={"example": 123}) assert response.status_code == 200 > assert response.text == '{"example":123}' E assert '{"example": 123}' == '{"example":123}' E - {"example":123} E + {"example": 123} E ? + tests/middleware/test_wsgi.py:81: AssertionError _____________________________ test_wsgi_post[trio] _____________________________ test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_wsgi_post(test_client_factory: TestClientFactory) -> None: app = WSGIMiddleware(echo_body) client = test_client_factory(app) response = client.post("/", json={"example": 123}) assert response.status_code == 200 > assert response.text == '{"example":123}' E assert '{"example": 123}' == '{"example":123}' E - {"example":123} E + {"example": 123} E ? + tests/middleware/test_wsgi.py:81: AssertionError =========== 86 failed, 849 passed, 2 deselected, 2 xfailed in 18.01s =========== error: Bad exit status from /var/tmp/rpm-tmp.C0NhtS (%check) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.C0NhtS (%check) Child return code was: 1 EXCEPTION: [Error('Command failed: \n # /usr/bin/systemd-nspawn -q -M 01aa0536b7b44ee1917c1f3f35a48172 -D /var/lib/mock/dist-an23-epao-build-507904-74948/root -a -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.48tzvvu1:/etc/resolv.conf --bind=/dev/mapper/control --bind=/dev/fuse --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin \'--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"\' \'--setenv=PS1= \\s-\\v\\$ \' --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c \'/usr/bin/rpmbuild -ba --noprep --noclean --target noarch /builddir/build/SPECS/python-starlette.spec\'\n', 1)] Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.6/site-packages/mockbuild/util.py", line 610, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (cmd_pretty(command, env), output), child.returncode) mockbuild.exception.Error: Command failed: # /usr/bin/systemd-nspawn -q -M 01aa0536b7b44ee1917c1f3f35a48172 -D /var/lib/mock/dist-an23-epao-build-507904-74948/root -a -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.48tzvvu1:/etc/resolv.conf --bind=/dev/mapper/control --bind=/dev/fuse --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin '--setenv=PROMPT_COMMAND=printf "\033]0;\007"' '--setenv=PS1= \s-\v\$ ' --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c '/usr/bin/rpmbuild -ba --noprep --noclean --target noarch /builddir/build/SPECS/python-starlette.spec'