Mock Version: 3.5 Mock Version: 3.5 Mock Version: 3.5 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-374017-71406/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'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['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'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1712793600 Wrote: /builddir/build/SRPMS/python-starlette-0.37.2-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-374017-71406/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'nspawn_args=[]unshare_net=TrueraiseExc=FalseprintOutput=False) Executing command: ['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'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1712793600 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.IqJuLq + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf starlette-0.37.2 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/starlette-0.37.2.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd starlette-0.37.2 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.8x5Msa + umask 022 + cd /builddir/build/BUILD + cd starlette-0.37.2 + 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.37.2/.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.37.2/.pyproject-builddir + RPM_TOXENV=py310 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/anolis/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/starlette-0.37.2/pyproject-wheeldir --output /builddir/build/BUILD/python-starlette-0.37.2-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.37.2-1.an23.noarch-pyproject-buildrequires + rm -rfv '*.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-starlette-0.37.2-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 --noclean --target noarch --nodeps /builddir/build/SPECS/python-starlette.spec'], chrootPath='/var/lib/mock/dist-an23-epao-build-374017-71406/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'nspawn_args=[]unshare_net=TrueraiseExc=FalseprintOutput=False) Executing command: ['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'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1712793600 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.oQhrK9 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf starlette-0.37.2 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/starlette-0.37.2.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd starlette-0.37.2 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.dl7qYQ + umask 022 + cd /builddir/build/BUILD + cd starlette-0.37.2 + 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.37.2/.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.37.2/.pyproject-builddir + RPM_TOXENV=py310 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/anolis/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/starlette-0.37.2/pyproject-wheeldir --output /builddir/build/BUILD/python-starlette-0.37.2-1.an23.noarch-pyproject-buildrequires Handling hatchling from build-system.requires Requirement satisfied: hatchling (installed: hatchling 1.21.0) Handling anyio<5,>=3.4.0 from hook generated metadata: Requires-Dist (starlette) Requirement satisfied: anyio<5,>=3.4.0 (installed: anyio 3.5.0) Handling typing-extensions>=3.10.0; python_version < '3.10' from hook generated metadata: Requires-Dist (starlette) Ignoring alien requirement: typing-extensions>=3.10.0; python_version < '3.10' Handling httpx>=0.22.0; extra == 'full' from hook generated metadata: Requires-Dist (starlette) Ignoring alien requirement: httpx>=0.22.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.7; extra == 'full' from hook generated metadata: Requires-Dist (starlette) Ignoring alien requirement: python-multipart>=0.0.7; 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.37.2-1.an23.noarch-pyproject-buildrequires + rm -rfv starlette-0.37.2.dist-info/ removed 'starlette-0.37.2.dist-info/METADATA' removed directory 'starlette-0.37.2.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-starlette-0.37.2-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 --nodeps /builddir/build/SPECS/python-starlette.spec'], chrootPath='/var/lib/mock/dist-an23-epao-build-374017-71406/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'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -ba --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'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1712793600 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.kZYnZ2 + umask 022 + cd /builddir/build/BUILD + cd starlette-0.37.2 + 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.37.2/.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.37.2/.pyproject-builddir + RPM_TOXENV=py310 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/anolis/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/starlette-0.37.2/pyproject-wheeldir --output /builddir/build/BUILD/python-starlette-0.37.2-1.an23.noarch-pyproject-buildrequires Handling hatchling from build-system.requires Requirement satisfied: hatchling (installed: hatchling 1.21.0) Handling anyio<5,>=3.4.0 from hook generated metadata: Requires-Dist (starlette) Requirement satisfied: anyio<5,>=3.4.0 (installed: anyio 3.5.0) Handling typing-extensions>=3.10.0; python_version < '3.10' from hook generated metadata: Requires-Dist (starlette) Ignoring alien requirement: typing-extensions>=3.10.0; python_version < '3.10' Handling httpx>=0.22.0; extra == 'full' from hook generated metadata: Requires-Dist (starlette) Ignoring alien requirement: httpx>=0.22.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.7; extra == 'full' from hook generated metadata: Requires-Dist (starlette) Ignoring alien requirement: python-multipart>=0.0.7; 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.37.2-1.an23.noarch-pyproject-buildrequires + rm -rfv starlette-0.37.2.dist-info/ removed 'starlette-0.37.2.dist-info/METADATA' removed directory 'starlette-0.37.2.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.J5jUz0 + 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.37.2 + mkdir -p /builddir/build/BUILD/starlette-0.37.2/.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.37.2/.pyproject-builddir + /usr/bin/python3 -Bs /usr/lib/rpm/anolis/pyproject_wheel.py /builddir/build/BUILD/starlette-0.37.2/pyproject-wheeldir Looking in indexes: https://mirrors.aliyun.com/pypi/simple/ Processing /builddir/build/BUILD/starlette-0.37.2 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.37.2-py3-none-any.whl size=71906 sha256=d7c99ef6cc1889bcb24cafbb6f8fa11de3004e6516342845655041a55b6c0d3f Stored in directory: /builddir/.cache/pip/wheels/74/2d/71/c469a17152fd5c97419f9b85d6229cded52e1b7c279460ef34 Successfully built starlette + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.4TlgGs + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch ++ dirname /builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/python-starlette-0.37.2-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.37.2 ++ ls /builddir/build/BUILD/starlette-0.37.2/pyproject-wheeldir/starlette-0.37.2-py3-none-any.whl ++ xargs basename --multiple ++ sed -E 's/([^-]+)-([^-]+)-.+\.whl/\1==\2/' + specifier=starlette==0.37.2 + TMPDIR=/builddir/build/BUILD/starlette-0.37.2/.pyproject-builddir + /usr/bin/python3 -m pip install --root /builddir/build/BUILDROOT/python-starlette-0.37.2-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.37.2/pyproject-wheeldir starlette==0.37.2 Using pip 23.3.1 from /usr/lib/python3.10/site-packages/pip (python 3.10) Looking in links: /builddir/build/BUILD/starlette-0.37.2/pyproject-wheeldir Processing ./pyproject-wheeldir/starlette-0.37.2-py3-none-any.whl Installing collected packages: starlette Successfully installed starlette-0.37.2 + '[' -d /builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/bin ']' + rm -f /builddir/build/BUILD/python-starlette-0.37.2-1.an23.noarch-pyproject-ghost-distinfo + site_dirs=() + '[' -d /builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib/python3.10/site-packages ']' + site_dirs+=("/usr/lib/python3.10/site-packages") + '[' /builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib64/python3.10/site-packages '!=' /builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib/python3.10/site-packages ']' + '[' -d /builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib64/python3.10/site-packages ']' + for site_dir in ${site_dirs[@]} + for distinfo in /builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch$site_dir/*.dist-info + echo '%ghost /usr/lib/python3.10/site-packages/starlette-0.37.2.dist-info' + sed -i s/pip/rpm/ /builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib/python3.10/site-packages/starlette-0.37.2.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.37.2-1.an23.noarch --record /builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib/python3.10/site-packages/starlette-0.37.2.dist-info/RECORD --output /builddir/build/BUILD/python-starlette-0.37.2-1.an23.noarch-pyproject-record + rm -fv /builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib/python3.10/site-packages/starlette-0.37.2.dist-info/RECORD removed '/builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib/python3.10/site-packages/starlette-0.37.2.dist-info/RECORD' + rm -fv /builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib/python3.10/site-packages/starlette-0.37.2.dist-info/REQUESTED removed '/builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib/python3.10/site-packages/starlette-0.37.2.dist-info/REQUESTED' ++ wc -l /builddir/build/BUILD/python-starlette-0.37.2-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.37.2-1.an23.noarch-pyproject-files --output-modules /builddir/build/BUILD/python-starlette-0.37.2-1.an23.noarch-pyproject-modules --buildroot /builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch --sitelib /usr/lib/python3.10/site-packages --sitearch /usr/lib64/python3.10/site-packages --python-version 3.10 --pyproject-record /builddir/build/BUILD/python-starlette-0.37.2-1.an23.noarch-pyproject-record --prefix /usr starlette + /usr/bin/find-debuginfo -j80 --strict-build-id -m -i --build-id-seed 0.37.2-1.an23 --unique-debug-suffix -0.37.2-1.an23.noarch --unique-debug-src-base python-starlette-0.37.2-1.an23.noarch --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/starlette-0.37.2 find: 'debug': No such file or directory + /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 + /usr/lib/rpm/anolis/brp-python-bytecompile '' 1 0 Bytecompiling .py files below /builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib/python3.10 using python3.10 + /usr/lib/rpm/anolis/brp-python-hardlink Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.iNhwyc + 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.37.2 + '[' '!' -f /builddir/build/BUILD/python-starlette-0.37.2-1.an23.noarch-pyproject-modules ']' + PATH=/builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib64/python3.10/site-packages:/builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib/python3.10/site-packages + _PYTHONSITE=/builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib64/python3.10/site-packages:/builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib/python3.10/site-packages + PYTHONDONTWRITEBYTECODE=1 + /usr/bin/python3 -s /usr/lib/rpm/anolis/import_all_modules.py -f /builddir/build/BUILD/python-starlette-0.37.2-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.37.2-1.an23.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib64/python3.10/site-packages:/builddir/build/BUILDROOT/python-starlette-0.37.2-1.an23.noarch/usr/lib/python3.10/site-packages + PYTHONDONTWRITEBYTECODE=1 + PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/starlette-0.37.2/.pyproject-builddir' + /usr/bin/pytest -W ignore::trio.TrioDeprecationWarning -k 'not test_lifespan_with_on_events' ============================= test session starts ============================== platform linux -- Python 3.10.13, pytest-7.3.1, pluggy-1.0.0 rootdir: /builddir/build/BUILD/starlette-0.37.2 configfile: pyproject.toml plugins: anyio-3.5.0 collected 795 items / 2 deselected / 793 selected tests/test__utils.py ...... [ 0%] tests/test_applications.py ............................................. [ 6%] ... [ 6%] tests/test_authentication.py ........... [ 8%] tests/test_background.py ........ [ 9%] 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 ..................... [ 20%] tests/test_formparsers.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF..FFFFFFFFFFFF [ 26%] FFFFFFFFFFFFFFFFFFFFFF [ 28%] tests/test_requests.py .............FFFF................................ [ 35%] .............................. [ 38%] tests/test_responses.py ................................................ [ 44%] ...................... [ 47%] tests/test_routing.py .................................................. [ 53%] ..................................... [ 58%] tests/test_schemas.py FFF [ 59%] tests/test_staticfiles.py .............................................. [ 64%] ...... [ 65%] tests/test_status.py .. [ 65%] tests/test_templates.py ....................... [ 68%] tests/test_testclient.py .........................x...x........... [ 73%] tests/test_websockets.py ............................................... [ 79%] ............................ [ 83%] tests/middleware/test_base.py .........x.x.............................. [ 88%] ..... [ 89%] tests/middleware/test_cors.py .............................. [ 93%] tests/middleware/test_errors.py ............ [ 94%] tests/middleware/test_gzip.py .......... [ 95%] 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 .......... [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:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:136: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:149: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:149: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:169: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:193: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:193: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:225: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:77: in app_with_headers data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:225: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:77: in app_with_headers data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:53: in multi_items_app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:262: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:53: in multi_items_app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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' # noqa: E501 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:330: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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' # noqa: E501 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:330: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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' # noqa: E501 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:361: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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' # noqa: E501 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:361: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:391: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:391: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:414: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:414: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:420: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:420: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:428: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:428: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:436: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:436: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:444: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:100: in app_read_body data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:444: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:100: in app_read_body data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:452: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:100: in app_read_body data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:452: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:100: in app_read_body data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError __________ test_missing_boundary_parameter[asyncio-app-expectation0] ___________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffffb1837a90> 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: typing.ContextManager[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 # noqa: E501 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:482: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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: typing.ContextManager[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 # noqa: E501 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:482: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:485: in handle await self.app(scope, receive, send) tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError ____________ test_missing_boundary_parameter[trio-app-expectation0] ____________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffffb1837a90> 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: typing.ContextManager[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 # noqa: E501 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:482: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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: typing.ContextManager[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 # noqa: E501 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:482: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:485: in handle await self.app(scope, receive, send) tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError _ test_missing_name_parameter_on_content_disposition[asyncio-app-expectation0] _ app = expectation = <_pytest.python_api.RaisesContext object at 0xffffb1837640> 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: typing.ContextManager[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:510: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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: typing.ContextManager[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:510: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:485: in handle await self.app(scope, receive, send) tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError __ test_missing_name_parameter_on_content_disposition[trio-app-expectation0] ___ app = expectation = <_pytest.python_api.RaisesContext object at 0xffffb1837640> 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: typing.ContextManager[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:510: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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: typing.ContextManager[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:510: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:485: in handle await self.app(scope, receive, send) tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError _____________ test_too_many_fields_raise[asyncio-app-expectation0] _____________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffffb1837bb0> 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append( "--B\r\n" f'Content-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:550: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append( "--B\r\n" f'Content-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:550: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:485: in handle await self.app(scope, receive, send) tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError ______________ test_too_many_fields_raise[trio-app-expectation0] _______________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffffb1837bb0> 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append( "--B\r\n" f'Content-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:550: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append( "--B\r\n" f'Content-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:550: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:485: in handle await self.app(scope, receive, send) tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError _____________ test_too_many_files_raise[asyncio-app-expectation0] ______________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffffb1837a00> 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append( "--B\r\n" f'Content-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:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append( "--B\r\n" f'Content-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:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:485: in handle await self.app(scope, receive, send) tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError _______________ test_too_many_files_raise[trio-app-expectation0] _______________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffffb1837a00> 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append( "--B\r\n" f'Content-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:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append( "--B\r\n" f'Content-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:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:485: in handle await self.app(scope, receive, send) tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError _______ test_too_many_files_single_field_raise[asyncio-app-expectation0] _______ app = expectation = <_pytest.python_api.RaisesContext object at 0xffffb18376a0> 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: typing.ContextManager[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( "--B\r\n" f'Content-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:614: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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: typing.ContextManager[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( "--B\r\n" f'Content-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:614: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:485: in handle await self.app(scope, receive, send) tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError ________ test_too_many_files_single_field_raise[trio-app-expectation0] _________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffffb18376a0> 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: typing.ContextManager[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( "--B\r\n" f'Content-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:614: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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: typing.ContextManager[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( "--B\r\n" f'Content-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:614: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:485: in handle await self.app(scope, receive, send) tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError ________ test_too_many_files_and_fields_raise[asyncio-app-expectation0] ________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffffb1837460> 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append( "--B\r\n" f'Content-Disposition: form-data; name="F{i}"; filename="F{i}";\r\n\r\n' "\r\n" ) fields.append( "--B\r\n" f'Content-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:648: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append( "--B\r\n" f'Content-Disposition: form-data; name="F{i}"; filename="F{i}";\r\n\r\n' "\r\n" ) fields.append( "--B\r\n" f'Content-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:648: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:485: in handle await self.app(scope, receive, send) tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError _________ test_too_many_files_and_fields_raise[trio-app-expectation0] __________ app = expectation = <_pytest.python_api.RaisesContext object at 0xffffb1837460> 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append( "--B\r\n" f'Content-Disposition: form-data; name="F{i}"; filename="F{i}";\r\n\r\n' "\r\n" ) fields.append( "--B\r\n" f'Content-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:648: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(1001): fields.append( "--B\r\n" f'Content-Disposition: form-data; name="F{i}"; filename="F{i}";\r\n\r\n' "\r\n" ) fields.append( "--B\r\n" f'Content-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:648: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:485: in handle await self.app(scope, receive, send) tests/test_formparsers.py:33: in app data = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError _____ test_max_fields_is_customizable_low_raises[asyncio-app-expectation0] _____ app = .app at 0xffffb191e830> expectation = <_pytest.python_api.RaisesContext object at 0xffffb1836d40> 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(2): fields.append( "--B\r\n" f'Content-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:680: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:112: in app data = await request.form(max_files=max_files, max_fields=max_fields) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(2): fields.append( "--B\r\n" f'Content-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:680: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:485: in handle await self.app(scope, receive, send) tests/test_formparsers.py:112: in app data = await request.form(max_files=max_files, max_fields=max_fields) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError ______ test_max_fields_is_customizable_low_raises[trio-app-expectation0] _______ app = .app at 0xffffb191e830> expectation = <_pytest.python_api.RaisesContext object at 0xffffb1836d40> 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(2): fields.append( "--B\r\n" f'Content-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:680: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:112: in app data = await request.form(max_files=max_files, max_fields=max_fields) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(2): fields.append( "--B\r\n" f'Content-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:680: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:485: in handle await self.app(scope, receive, send) tests/test_formparsers.py:112: in app data = await request.form(max_files=max_files, max_fields=max_fields) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError _____ test_max_files_is_customizable_low_raises[asyncio-app-expectation0] ______ app = .app at 0xffffb191e9e0> expectation = <_pytest.python_api.RaisesContext object at 0xffffb1836bc0> 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(2): fields.append( "--B\r\n" f'Content-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:714: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:112: in app data = await request.form(max_files=max_files, max_fields=max_fields) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(2): fields.append( "--B\r\n" f'Content-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:714: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:485: in handle await self.app(scope, receive, send) tests/test_formparsers.py:112: in app data = await request.form(max_files=max_files, max_fields=max_fields) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError _______ test_max_files_is_customizable_low_raises[trio-app-expectation0] _______ app = .app at 0xffffb191e9e0> expectation = <_pytest.python_api.RaisesContext object at 0xffffb1836bc0> 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(2): fields.append( "--B\r\n" f'Content-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:714: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:112: in app data = await request.form(max_files=max_files, max_fields=max_fields) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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: typing.ContextManager[Exception], test_client_factory: TestClientFactory, ) -> None: client = test_client_factory(app) fields = [] for i in range(2): fields.append( "--B\r\n" f'Content-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:714: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:485: in handle await self.app(scope, receive, send) tests/test_formparsers.py:112: in app data = await request.form(max_files=max_files, max_fields=max_fields) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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( "--B\r\n" f'Content-Disposition: form-data; name="N{i}";\r\n\r\n' "\r\n" ) fields.append( "--B\r\n" f'Content-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:739: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:112: in app data = await request.form(max_files=max_files, max_fields=max_fields) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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( "--B\r\n" f'Content-Disposition: form-data; name="N{i}";\r\n\r\n' "\r\n" ) fields.append( "--B\r\n" f'Content-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:739: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_formparsers.py:112: in app data = await request.form(max_files=max_files, max_fields=max_fields) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_requests.py:126: in app form = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:132: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_requests.py:126: in app form = await request.form() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:145: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_requests.py:139: in app async with request.form() as form: starlette/_utils.py:76: in __aenter__ self.entered = await self.aw _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: 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:145: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:633: in post return super().post( /usr/lib/python3.10/site-packages/httpx/_client.py:1130: in post return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:451: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval tests/test_requests.py:139: in app async with request.form() as form: starlette/_utils.py:76: in __aenter__ self.entered = await self.aw _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = async def _get_form( self, *, max_files: int | float = 1000, max_fields: int | float = 1000 ) -> FormData: if self._form is None: 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:260: AssertionError ____________________________ test_schema_generation ____________________________ def test_schema_generation() -> None: > schema = schemas.get_schema(routes=app.routes) tests/test_schemas.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/schemas.py:140: in get_schema parsed = self.parse_docstring(endpoint.func) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = func_or_method = def parse_docstring( self, func_or_method: typing.Callable[..., typing.Any] ) -> dict[str, typing.Any]: """ Given a function, parse the docstring as YAML and return a dictionary of info. """ docstring = func_or_method.__doc__ if not docstring: return {} > assert yaml is not None, "`pyyaml` must be installed to use parse_docstring." E AssertionError: `pyyaml` must be installed to use parse_docstring. starlette/schemas.py:108: AssertionError ________________________ test_schema_endpoint[asyncio] _________________________ test_client_factory = functools.partial(, backend='asyncio', backend_options={}) def test_schema_endpoint(test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.get("/schema") tests/test_schemas.py:274: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:548: in get return super().get( /usr/lib/python3.10/site-packages/httpx/_client.py:1039: in get return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:297: in handle await self.app(scope, receive, send) starlette/routing.py:77: in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:74: in app response = await run_in_threadpool(func, request) starlette/concurrency.py:42: in run_in_threadpool return await anyio.to_thread.run_sync(func, *args) /usr/lib/python3.10/site-packages/anyio/to_thread.py:28: in run_sync return await get_asynclib().run_sync_in_worker_thread(func, *args, cancellable=cancellable, /usr/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:818: in run_sync_in_worker_thread return await future /usr/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:754: in run result = context.run(func, *args) tests/test_schemas.py:113: in schema return schemas.OpenAPIResponse(request=request) starlette/schemas.py:126: in OpenAPIResponse schema = self.get_schema(routes=routes) starlette/schemas.py:140: in get_schema parsed = self.parse_docstring(endpoint.func) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = func_or_method = def parse_docstring( self, func_or_method: typing.Callable[..., typing.Any] ) -> dict[str, typing.Any]: """ Given a function, parse the docstring as YAML and return a dictionary of info. """ docstring = func_or_method.__doc__ if not docstring: return {} > assert yaml is not None, "`pyyaml` must be installed to use parse_docstring." E AssertionError: `pyyaml` must be installed to use parse_docstring. starlette/schemas.py:108: AssertionError __________________________ test_schema_endpoint[trio] __________________________ test_client_factory = functools.partial(, backend='trio', backend_options={}) def test_schema_endpoint(test_client_factory: TestClientFactory) -> None: client = test_client_factory(app) > response = client.get("/schema") tests/test_schemas.py:274: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ starlette/testclient.py:548: in get return super().get( /usr/lib/python3.10/site-packages/httpx/_client.py:1039: in get return self.request( starlette/testclient.py:516: in request return super().request( /usr/lib/python3.10/site-packages/httpx/_client.py:815: in request return self.send(request, auth=auth, follow_redirects=follow_redirects) /usr/lib/python3.10/site-packages/httpx/_client.py:902: in send response = self._send_handling_auth( /usr/lib/python3.10/site-packages/httpx/_client.py:930: in _send_handling_auth response = self._send_handling_redirects( /usr/lib/python3.10/site-packages/httpx/_client.py:967: in _send_handling_redirects response = self._send_single_request(request) /usr/lib/python3.10/site-packages/httpx/_client.py:1003: in _send_single_request response = transport.handle_request(request) starlette/testclient.py:398: in handle_request raise exc starlette/testclient.py:395: in handle_request portal.call(self.app, scope, receive, send) /usr/lib/python3.10/site-packages/anyio/from_thread.py:240: in call return cast(T_Retval, self.start_task_soon(func, *args).result()) /usr/lib64/python3.10/concurrent/futures/_base.py:458: in result return self.__get_result() /usr/lib64/python3.10/concurrent/futures/_base.py:403: in __get_result raise self._exception /usr/lib/python3.10/site-packages/anyio/from_thread.py:187: in _call_func retval = await retval starlette/applications.py:123: 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:65: in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:756: in __call__ await self.middleware_stack(scope, receive, send) starlette/routing.py:776: in app await route.handle(scope, receive, send) starlette/routing.py:297: in handle await self.app(scope, receive, send) starlette/routing.py:77: in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) starlette/_exception_handler.py:64: in wrapped_app raise exc starlette/_exception_handler.py:53: in wrapped_app await app(scope, receive, sender) starlette/routing.py:74: in app response = await run_in_threadpool(func, request) starlette/concurrency.py:42: in run_in_threadpool return await anyio.to_thread.run_sync(func, *args) /usr/lib/python3.10/site-packages/anyio/to_thread.py:28: in run_sync return await get_asynclib().run_sync_in_worker_thread(func, *args, cancellable=cancellable, /usr/lib/python3.10/site-packages/anyio/_backends/_trio.py:180: in run_sync_in_worker_thread return await run_sync(context.run, wrapper, cancellable=cancellable, limiter=limiter) /usr/lib/python3.10/site-packages/trio/_threads.py:215: in to_thread_run_sync return await trio.lowlevel.wait_task_rescheduled(abort) /usr/lib/python3.10/site-packages/trio/_core/_traps.py:166: in wait_task_rescheduled return (await _async_yield(WaitTaskRescheduled(abort_func))).unwrap() /usr/lib/python3.10/site-packages/outcome/_impl.py:138: in unwrap raise captured_error /usr/lib/python3.10/site-packages/trio/_threads.py:161: in do_release_then_return_result return result.unwrap() /usr/lib/python3.10/site-packages/outcome/_impl.py:138: in unwrap raise captured_error /usr/lib/python3.10/site-packages/trio/_threads.py:175: in worker_fn ret = sync_fn(*args) /usr/lib/python3.10/site-packages/anyio/_backends/_trio.py:175: in wrapper return func(*args) tests/test_schemas.py:113: in schema return schemas.OpenAPIResponse(request=request) starlette/schemas.py:126: in OpenAPIResponse schema = self.get_schema(routes=routes) starlette/schemas.py:140: in get_schema parsed = self.parse_docstring(endpoint.func) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = func_or_method = def parse_docstring( self, func_or_method: typing.Callable[..., typing.Any] ) -> dict[str, typing.Any]: """ Given a function, parse the docstring as YAML and return a dictionary of info. """ docstring = func_or_method.__doc__ if not docstring: return {} > assert yaml is not None, "`pyyaml` must be installed to use parse_docstring." E AssertionError: `pyyaml` must be installed to use parse_docstring. starlette/schemas.py:108: AssertionError =========================== short test summary info ============================ XFAIL tests/test_testclient.py::test_domain_restricted_cookies[asyncio-testserver-True] - Fails due to domain handling in http.cookiejar module (see #2152) XFAIL tests/test_testclient.py::test_domain_restricted_cookies[trio-testserver-True] - Fails due to domain handling in http.cookiejar module (see #2152) XFAIL tests/middleware/test_base.py::test_contextvars[asyncio-CustomMiddlewareUsingBaseHTTPMiddleware] - BaseHTTPMiddleware creates a TaskGroup which copies the contextand erases any changes to it made within the TaskGroup XFAIL tests/middleware/test_base.py::test_contextvars[trio-CustomMiddlewareUsingBaseHTTPMiddleware] - BaseHTTPMiddleware creates a TaskGroup which copies the contextand erases any changes to it made within the TaskGroup ====== 73 failed, 716 passed, 2 deselected, 4 xfailed in 86.65s (0:01:26) ====== error: Bad exit status from /var/tmp/rpm-tmp.iNhwyc (%check) Bad exit status from /var/tmp/rpm-tmp.iNhwyc (%check) RPM build errors: Child return code was: 1 EXCEPTION: [Error('Command failed: \n # bash --login -c /usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /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 598, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-starlette.spec