Mock Version: 6.5 Mock Version: 6.5 Mock Version: 6.5 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/python-formulaic.spec'], chrootPath='/var/lib/mock/f45-build-56857-987/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=864000uid=995gid=135user='mockbuild'unshare_net=TrueprintOutput=Falsenspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', 'b6f8050298bf4e739c25492356ce3f9f', '-D', '/var/lib/mock/f45-build-56857-987/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/python-formulaic.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1758240000 Wrote: /builddir/build/SRPMS/python-formulaic-1.1.1-6.fc45.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-formulaic.spec'], chrootPath='/var/lib/mock/f45-build-56857-987/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=864000uid=995gid=135user='mockbuild'unshare_net=TrueraiseExc=FalseprintOutput=Falsenspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', 'e7d94001b0ab49239d2d9d428b1a2674', '-D', '/var/lib/mock/f45-build-56857-987/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-formulaic.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1758240000 Executing(mkbuilddir): /bin/sh -e /var/tmp/rpm-tmp.eW7RoT Creating(rpmbuild.env): /builddir/build/BUILD/python-formulaic-1.1.1-build/rpmbuild.env RPM_SOURCE_DIR="/builddir/build/SOURCES" RPM_BUILD_DIR="/builddir/build/BUILD/python-formulaic-1.1.1-build" RPM_OPT_FLAGS="-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" RPM_LD_FLAGS="-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 " RPM_ARCH="noarch" RPM_OS="linux" RPM_BUILD_NCPUS="8" RPM_SPECPARTS_DIR="/builddir/build/BUILD/python-formulaic-1.1.1-build/SPECPARTS" export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS RPM_SPECPARTS_DIR RPM_LD_FLAGS RPM_DOC_DIR="/usr/share/doc" export RPM_DOC_DIR RPM_PACKAGE_NAME="python-formulaic" RPM_PACKAGE_VERSION="1.1.1" RPM_PACKAGE_RELEASE="6.fc45" export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE LANG=C.UTF-8 export LANG unset CDPATH DISPLAY ||: unset DEBUGINFOD_URLS ||: unset RPM_CONFIG_DIR ||: RPM_BUILD_ROOT="/builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT" export RPM_BUILD_ROOT PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/lib/pkgconfig:/usr/share/pkgconfig" export PKG_CONFIG_PATH CONFIG_SITE=${CONFIG_SITE:-NONE} export CONFIG_SITE Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.4ZYMlG + umask 022 + cd /builddir/build/BUILD/python-formulaic-1.1.1-build + cd /builddir/build/BUILD/python-formulaic-1.1.1-build + rm -rf formulaic-1.1.1 + /usr/bin/rpmuncompress -x /builddir/build/SOURCES/python-formulaic-1.1.1.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd formulaic-1.1.1 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + RPM_EC=0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.30p9i3 ++ jobs -p + exit 0 + umask 022 + cd /builddir/build/BUILD/python-formulaic-1.1.1-build + cd formulaic-1.1.1 + export SETUPTOOLS_SCM_PRETEND_VERSION=1.1.1 + SETUPTOOLS_SCM_PRETEND_VERSION=1.1.1 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(packaging)' + echo 'python3dist(pip) >= 19' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/python-formulaic-1.1.1-build/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib/gfortran/modules ' + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib/gfortran/modules ' + VALAFLAGS=-g + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + LT_SYS_LIBRARY_PATH=/usr/lib: + CC=gcc + CXX=g++ + TMPDIR=/builddir/build/BUILD/python-formulaic-1.1.1-build/.pyproject-builddir + RPM_TOXENV=py315 + FEDORA=45 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/python-formulaic-1.1.1-build/pyproject-wheeldir --output /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-buildrequires --dep-overrides-file /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-dep-overrides -x arrow,calculus Handling hatchling from build-system.requires Requirement not satisfied: hatchling Handling hatch-vcs from build-system.requires Requirement not satisfied: hatch-vcs Exiting dependency generation pass: build backend + cat /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-buildrequires + rm -rfv '*.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-formulaic-1.1.1-6.fc45.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-formulaic.spec'], chrootPath='/var/lib/mock/f45-build-56857-987/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=864000uid=995gid=135user='mockbuild'unshare_net=TrueraiseExc=FalseprintOutput=Falsenspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '39ad18d43e354c9b8d22cf92009e9953', '-D', '/var/lib/mock/f45-build-56857-987/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -br --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-formulaic.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1758240000 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.Pkjwmp + umask 022 + cd /builddir/build/BUILD/python-formulaic-1.1.1-build + cd formulaic-1.1.1 + export SETUPTOOLS_SCM_PRETEND_VERSION=1.1.1 + SETUPTOOLS_SCM_PRETEND_VERSION=1.1.1 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(packaging)' + echo 'python3dist(pip) >= 19' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/python-formulaic-1.1.1-build/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib/gfortran/modules ' + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib/gfortran/modules ' + VALAFLAGS=-g + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + LT_SYS_LIBRARY_PATH=/usr/lib: + CC=gcc + CXX=g++ + TMPDIR=/builddir/build/BUILD/python-formulaic-1.1.1-build/.pyproject-builddir + RPM_TOXENV=py315 + FEDORA=45 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/python-formulaic-1.1.1-build/pyproject-wheeldir --output /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-buildrequires --dep-overrides-file /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-dep-overrides -x arrow,calculus Handling hatchling from build-system.requires Requirement satisfied: hatchling (installed: hatchling 1.31.0) Handling hatch-vcs from build-system.requires Requirement satisfied: hatch-vcs (installed: hatch-vcs 0.5.0) Handling astor>=0.8; python_version < '3.9' from hook generated metadata: Requires-Dist (formulaic) Ignoring alien requirement: astor>=0.8; python_version < '3.9' Handling cached-property>=1.3.0; python_version < '3.8' from hook generated metadata: Requires-Dist (formulaic) Ignoring alien requirement: cached-property>=1.3.0; python_version < '3.8' Handling graphlib-backport>=1.0.0; python_version < '3.9' from hook generated metadata: Requires-Dist (formulaic) Ignoring alien requirement: graphlib-backport>=1.0.0; python_version < '3.9' Handling interface-meta>=1.2.0 from hook generated metadata: Requires-Dist (formulaic) Requirement not satisfied: interface-meta>=1.2.0 Handling numpy>=1.16.5 from hook generated metadata: Requires-Dist (formulaic) Requirement not satisfied: numpy>=1.16.5 Handling pandas>=1.0 from hook generated metadata: Requires-Dist (formulaic) Requirement not satisfied: pandas>=1.0 Handling scipy>=1.6 from hook generated metadata: Requires-Dist (formulaic) Requirement not satisfied: scipy>=1.6 Handling typing-extensions>=4.2.0 from hook generated metadata: Requires-Dist (formulaic) Requirement not satisfied: typing-extensions>=4.2.0 Handling wrapt>=1.0; python_version < '3.13' from hook generated metadata: Requires-Dist (formulaic) Ignoring alien requirement: wrapt>=1.0; python_version < '3.13' Handling wrapt>=1.17.0rc1; python_version >= '3.13' from hook generated metadata: Requires-Dist (formulaic) Requirement not satisfied: wrapt>=1.17.0rc1; python_version >= "3.13" Handling pyarrow>=1; extra == 'arrow' from hook generated metadata: Requires-Dist (formulaic) Requirement not satisfied: pyarrow>=1; extra == "arrow" Handling sympy!=1.10,>=1.3; extra == 'calculus' from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: sympy!=1.10,>=1.3; extra == "calculus" (installed: sympy 1.14.0) + cat /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-buildrequires + rm -rfv formulaic-1.1.1.dist-info/ removed 'formulaic-1.1.1.dist-info/METADATA' removed directory 'formulaic-1.1.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-formulaic-1.1.1-6.fc45.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-formulaic.spec'], chrootPath='/var/lib/mock/f45-build-56857-987/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=864000uid=995gid=135user='mockbuild'unshare_net=TrueraiseExc=FalseprintOutput=Falsenspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '2735d655f3c54aea85aabed5627bc2da', '-D', '/var/lib/mock/f45-build-56857-987/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -br --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-formulaic.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1758240000 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.ofPJzw + umask 022 + cd /builddir/build/BUILD/python-formulaic-1.1.1-build + cd formulaic-1.1.1 + export SETUPTOOLS_SCM_PRETEND_VERSION=1.1.1 + SETUPTOOLS_SCM_PRETEND_VERSION=1.1.1 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(packaging)' + echo 'python3dist(pip) >= 19' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/python-formulaic-1.1.1-build/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib/gfortran/modules ' + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib/gfortran/modules ' + VALAFLAGS=-g + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + LT_SYS_LIBRARY_PATH=/usr/lib: + CC=gcc + CXX=g++ + TMPDIR=/builddir/build/BUILD/python-formulaic-1.1.1-build/.pyproject-builddir + RPM_TOXENV=py315 + FEDORA=45 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/python-formulaic-1.1.1-build/pyproject-wheeldir --output /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-buildrequires --dep-overrides-file /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-dep-overrides -x arrow,calculus Handling hatchling from build-system.requires Requirement satisfied: hatchling (installed: hatchling 1.31.0) Handling hatch-vcs from build-system.requires Requirement satisfied: hatch-vcs (installed: hatch-vcs 0.5.0) Handling astor>=0.8; python_version < '3.9' from hook generated metadata: Requires-Dist (formulaic) Ignoring alien requirement: astor>=0.8; python_version < '3.9' Handling cached-property>=1.3.0; python_version < '3.8' from hook generated metadata: Requires-Dist (formulaic) Ignoring alien requirement: cached-property>=1.3.0; python_version < '3.8' Handling graphlib-backport>=1.0.0; python_version < '3.9' from hook generated metadata: Requires-Dist (formulaic) Ignoring alien requirement: graphlib-backport>=1.0.0; python_version < '3.9' Handling interface-meta>=1.2.0 from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: interface-meta>=1.2.0 (installed: interface-meta 1.3.0) Handling numpy>=1.16.5 from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: numpy>=1.16.5 (installed: numpy 2.5.2) Handling pandas>=1.0 from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: pandas>=1.0 (installed: pandas 3.0.6) Handling scipy>=1.6 from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: scipy>=1.6 (installed: scipy 1.18.0) Handling typing-extensions>=4.2.0 from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: typing-extensions>=4.2.0 (installed: typing-extensions 4.16.0) Handling wrapt>=1.0; python_version < '3.13' from hook generated metadata: Requires-Dist (formulaic) Ignoring alien requirement: wrapt>=1.0; python_version < '3.13' Handling wrapt>=1.17.0rc1; python_version >= '3.13' from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: wrapt>=1.17.0rc1; python_version >= "3.13" (installed: wrapt 2.4.1) Handling pyarrow>=1; extra == 'arrow' from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: pyarrow>=1; extra == "arrow" (installed: pyarrow 23.0.1) Handling sympy!=1.10,>=1.3; extra == 'calculus' from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: sympy!=1.10,>=1.3; extra == "calculus" (installed: sympy 1.14.0) + cat /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-buildrequires + rm -rfv formulaic-1.1.1.dist-info/ removed 'formulaic-1.1.1.dist-info/METADATA' removed directory 'formulaic-1.1.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-formulaic-1.1.1-6.fc45.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-formulaic.spec'], chrootPath='/var/lib/mock/f45-build-56857-987/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=864000uid=995gid=135user='mockbuild'unshare_net=TrueprintOutput=Falsenspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '982fdfd7508342f9bae3ac797d6dda3e', '-D', '/var/lib/mock/f45-build-56857-987/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-formulaic.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1758240000 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.7HHcM8 + umask 022 + cd /builddir/build/BUILD/python-formulaic-1.1.1-build + cd formulaic-1.1.1 + export SETUPTOOLS_SCM_PRETEND_VERSION=1.1.1 + SETUPTOOLS_SCM_PRETEND_VERSION=1.1.1 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(packaging)' + echo 'python3dist(pip) >= 19' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/python-formulaic-1.1.1-build/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib/gfortran/modules ' + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib/gfortran/modules ' + VALAFLAGS=-g + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + LT_SYS_LIBRARY_PATH=/usr/lib: + CC=gcc + CXX=g++ + TMPDIR=/builddir/build/BUILD/python-formulaic-1.1.1-build/.pyproject-builddir + RPM_TOXENV=py315 + FEDORA=45 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/python-formulaic-1.1.1-build/pyproject-wheeldir --output /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-buildrequires --dep-overrides-file /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-dep-overrides -x arrow,calculus Handling hatchling from build-system.requires Requirement satisfied: hatchling (installed: hatchling 1.31.0) Handling hatch-vcs from build-system.requires Requirement satisfied: hatch-vcs (installed: hatch-vcs 0.5.0) Handling astor>=0.8; python_version < '3.9' from hook generated metadata: Requires-Dist (formulaic) Ignoring alien requirement: astor>=0.8; python_version < '3.9' Handling cached-property>=1.3.0; python_version < '3.8' from hook generated metadata: Requires-Dist (formulaic) Ignoring alien requirement: cached-property>=1.3.0; python_version < '3.8' Handling graphlib-backport>=1.0.0; python_version < '3.9' from hook generated metadata: Requires-Dist (formulaic) Ignoring alien requirement: graphlib-backport>=1.0.0; python_version < '3.9' Handling interface-meta>=1.2.0 from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: interface-meta>=1.2.0 (installed: interface-meta 1.3.0) Handling numpy>=1.16.5 from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: numpy>=1.16.5 (installed: numpy 2.5.2) Handling pandas>=1.0 from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: pandas>=1.0 (installed: pandas 3.0.6) Handling scipy>=1.6 from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: scipy>=1.6 (installed: scipy 1.18.0) Handling typing-extensions>=4.2.0 from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: typing-extensions>=4.2.0 (installed: typing-extensions 4.16.0) Handling wrapt>=1.0; python_version < '3.13' from hook generated metadata: Requires-Dist (formulaic) Ignoring alien requirement: wrapt>=1.0; python_version < '3.13' Handling wrapt>=1.17.0rc1; python_version >= '3.13' from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: wrapt>=1.17.0rc1; python_version >= "3.13" (installed: wrapt 2.4.1) Handling pyarrow>=1; extra == 'arrow' from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: pyarrow>=1; extra == "arrow" (installed: pyarrow 23.0.1) Handling sympy!=1.10,>=1.3; extra == 'calculus' from hook generated metadata: Requires-Dist (formulaic) Requirement satisfied: sympy!=1.10,>=1.3; extra == "calculus" (installed: sympy 1.14.0) + cat /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-buildrequires + rm -rfv formulaic-1.1.1.dist-info/ removed 'formulaic-1.1.1.dist-info/METADATA' removed directory 'formulaic-1.1.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.dWXJjA + umask 022 + cd /builddir/build/BUILD/python-formulaic-1.1.1-build + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-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 formulaic-1.1.1 + export SETUPTOOLS_SCM_PRETEND_VERSION=1.1.1 + SETUPTOOLS_SCM_PRETEND_VERSION=1.1.1 + mkdir -p /builddir/build/BUILD/python-formulaic-1.1.1-build/.pyproject-builddir + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib/gfortran/modules ' + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib/gfortran/modules ' + VALAFLAGS=-g + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + LT_SYS_LIBRARY_PATH=/usr/lib: + CC=gcc + CXX=g++ + TMPDIR=/builddir/build/BUILD/python-formulaic-1.1.1-build/.pyproject-builddir + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_wheel.py /builddir/build/BUILD/python-formulaic-1.1.1-build/pyproject-wheeldir Processing ./. Preparing metadata (pyproject.toml): started Running command Preparing metadata (pyproject.toml) Preparing metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: formulaic Building wheel for formulaic (pyproject.toml): started Running command Building wheel for formulaic (pyproject.toml) Building wheel for formulaic (pyproject.toml): finished with status 'done' Created wheel for formulaic: filename=formulaic-1.1.1-py3-none-any.whl size=115157 sha256=18e7d37da55aa1ea4584e238b4c367b7397766cc6f9c299ee521641e69f2ecb5 Stored in directory: /builddir/.cache/pip/wheels/bf/d2/75/7d86e6c4679377cab97c113c97e41fd39d2387cae6c79e1aa1 Successfully built formulaic + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.167fyj + umask 022 + cd /builddir/build/BUILD/python-formulaic-1.1.1-build + '[' /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT '!=' / ']' + rm -rf /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT ++ dirname /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT + mkdir -p /builddir/build/BUILD/python-formulaic-1.1.1-build + mkdir /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-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 formulaic-1.1.1 + export SETUPTOOLS_SCM_PRETEND_VERSION=1.1.1 + SETUPTOOLS_SCM_PRETEND_VERSION=1.1.1 ++ ls /builddir/build/BUILD/python-formulaic-1.1.1-build/pyproject-wheeldir/formulaic-1.1.1-py3-none-any.whl ++ sed -E 's/([^-]+)-([^-]+)-.+\.whl/\1==\2/' ++ xargs basename --multiple + specifier=formulaic==1.1.1 + '[' -z formulaic==1.1.1 ']' + PIP_CONFIG_FILE=/dev/null + TMPDIR=/builddir/build/BUILD/python-formulaic-1.1.1-build/.pyproject-builddir + /usr/bin/python3 -m pip install --root /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT --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/python-formulaic-1.1.1-build/pyproject-wheeldir formulaic==1.1.1 Using pip 26.1.2 from /usr/lib/python3.15/site-packages/pip (python 3.15) Looking in links: /builddir/build/BUILD/python-formulaic-1.1.1-build/pyproject-wheeldir Processing /builddir/build/BUILD/python-formulaic-1.1.1-build/pyproject-wheeldir/formulaic-1.1.1-py3-none-any.whl Installing collected packages: formulaic Successfully installed formulaic-1.1.1 + '[' -d /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/bin ']' + rm -f /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-ghost-distinfo + site_dirs=() + '[' -d /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages ']' + site_dirs+=("/usr/lib/python3.15/site-packages") + '[' /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib64/python3.15/site-packages '!=' /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages ']' + '[' -d /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib64/python3.15/site-packages ']' + for site_dir in ${site_dirs[@]} + for distinfo in /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT$site_dir/*.dist-info + echo '%ghost %dir /usr/lib/python3.15/site-packages/formulaic-1.1.1.dist-info' +++ basename /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic-1.1.1.dist-info ++ PYTHONPATH=/usr/lib/rpm/redhat ++ /usr/bin/python3 -sBc 'import sys; from pyproject_save_files import canonical_name_from_distinfo; print(canonical_name_from_distinfo(sys.argv[1]))' formulaic-1.1.1.dist-info + _normalized=formulaic + echo '%ghost %dir /usr/lib/python3.15/site-packages/formulaic-1.1.1.dist-info' + sed -i s/pip/rpm/ /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic-1.1.1.dist-info/INSTALLER + PYTHONPATH=/usr/lib/rpm/redhat + /usr/bin/python3 -B /usr/lib/rpm/redhat/pyproject_preprocess_record.py --buildroot /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT --record /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic-1.1.1.dist-info/RECORD --output /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-record + rm -fv /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic-1.1.1.dist-info/RECORD removed '/builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic-1.1.1.dist-info/RECORD' + rm -fv /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic-1.1.1.dist-info/REQUESTED removed '/builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic-1.1.1.dist-info/REQUESTED' + '[' -f /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-dep-overrides ']' ++ wc -l /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-ghost-distinfo ++ cut -f1 '-d ' + lines=1 + '[' 1 -ne 1 ']' + RPM_FILES_ESCAPE=4.19 + /usr/bin/python3 /usr/lib/rpm/redhat/pyproject_save_files.py --output-files /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-files --output-modules /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-modules --buildroot /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT --sitelib /usr/lib/python3.15/site-packages --sitearch /usr/lib64/python3.15/site-packages --python-version 3.15 --pyproject-record /builddir/build/BUILD/python-formulaic-1.1.1-build/python-formulaic-1.1.1-6.fc45.noarch-pyproject-record --prefix /usr -l formulaic + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + COMPRESS='gzip -9 -n' + COMPRESS_EXT=.gz + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip /usr/bin/strip + /usr/lib/rpm/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump + /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/redhat/brp-mangle-shebangs + /usr/lib/rpm/brp-remove-la-files + /usr/lib/rpm/redhat/brp-python-rpm-in-distinfo + env /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 -j8 Bytecompiling .py files below /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15 using python3.15 + /usr/lib/rpm/redhat/brp-python-hardlink + /usr/bin/add-det --brp -j8 /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/materializers/types/__pycache__/__init__.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/materializers/types/__pycache__/enums.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/materializers/__pycache__/__init__.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/materializers/types/__pycache__/scoped_factor.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/materializers/__pycache__/arrow.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/parser/algos/__pycache__/__init__.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/materializers/types/__pycache__/evaluated_factor.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/parser/algos/__pycache__/sanitize_tokens.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/parser/types/__pycache__/__init__.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/parser/algos/__pycache__/tokenize.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/materializers/types/__pycache__/scoped_term.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/parser/types/__pycache__/ast_node.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/parser/algos/__pycache__/tokens_to_ast.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/materializers/types/__pycache__/factor_values.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/parser/types/__pycache__/factor.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/materializers/__pycache__/pandas.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/parser/types/__pycache__/operator_resolver.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/parser/types/__pycache__/ordered_set.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/parser/types/__pycache__/operator.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/parser/__pycache__/__init__.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/transforms/__pycache__/__init__.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/parser/types/__pycache__/term.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/transforms/__pycache__/basis_spline.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/parser/types/__pycache__/formula_parser.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/parser/__pycache__/utils.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/transforms/__pycache__/identity.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/transforms/__pycache__/lag.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/transforms/__pycache__/hashed.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/transforms/__pycache__/patsy_compat.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/transforms/__pycache__/scale.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/transforms/__pycache__/poly.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/parser/types/__pycache__/token.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/utils/__pycache__/calculus.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/utils/__pycache__/cast.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/utils/__pycache__/__init__.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/utils/__pycache__/code.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/utils/__pycache__/context.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/parser/__pycache__/parser.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/transforms/__pycache__/cubic_spline.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/materializers/__pycache__/base.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/utils/__pycache__/iterators.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/utils/__pycache__/sentinels.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/utils/__pycache__/sparse.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/transforms/__pycache__/contrasts.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/utils/__pycache__/deprecations.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/utils/__pycache__/stateful_transforms.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/utils/__pycache__/null_handling.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/utils/__pycache__/layered_mapping.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/utils/__pycache__/variables.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/__pycache__/__init__.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/__pycache__/_version.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/__pycache__/errors.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/__pycache__/model_matrix.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/__pycache__/sugar.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/utils/__pycache__/constraints.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/utils/__pycache__/structured.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/__pycache__/model_spec.cpython-315.pyc: rewriting with normalized contents /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages/formulaic/__pycache__/formula.cpython-315.pyc: rewriting with normalized contents Scanned 23 directories and 178 files, processed 58 inodes, 58 modified (0 replaced + 58 rewritten), 0 unsupported format, 0 errors + /usr/bin/linkdupes --brp /builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr Scanned 22 directories and 178 files, considered 178 files, read 0 files, linked 0 files, 0 errors sum of sizes of linked files: 0 bytes Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.CDALGP + umask 022 + cd /builddir/build/BUILD/python-formulaic-1.1.1-build + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-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 formulaic-1.1.1 + export SETUPTOOLS_SCM_PRETEND_VERSION=1.1.1 + SETUPTOOLS_SCM_PRETEND_VERSION=1.1.1 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=rva23u64 -mabi=lp64d -fasynchronous-unwind-tables -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + PATH=/builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin + PYTHONPATH=/builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib64/python3.15/site-packages:/builddir/build/BUILD/python-formulaic-1.1.1-build/BUILDROOT/usr/lib/python3.15/site-packages + PYTHONDONTWRITEBYTECODE=1 + PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/python-formulaic-1.1.1-build/.pyproject-builddir' + PYTEST_XDIST_AUTO_NUM_WORKERS=8 + /usr/bin/pytest ============================= test session starts ============================== platform linux -- Python 3.15.0rc2, pytest-9.1.1, pluggy-1.6.0 rootdir: /builddir/build/BUILD/python-formulaic-1.1.1-build/formulaic-1.1.1 configfile: pyproject.toml collected 507 items tests/materializers/test_arrow.py ..F.F.F.F.. [ 2%] tests/materializers/test_base.py ........ [ 3%] tests/materializers/test_pandas.py ..F.FFF..F.FFF.F.FFF..F.FFF.F.FFF.F.F [ 11%] FF.FF...FF.F...... [ 14%] tests/materializers/types/test_evaluated_factor.py .... [ 15%] tests/materializers/types/test_factor_values.py .. [ 15%] tests/materializers/types/test_scoped_factor.py .... [ 16%] tests/materializers/types/test_scoped_term.py ...... [ 17%] tests/parser/algos/test_tokenize.py ............................. [ 23%] tests/parser/algos/test_tokens_to_ast.py ............................. [ 29%] tests/parser/test_parser.py ............................................ [ 37%] ............................. [ 43%] tests/parser/test_utils.py .... [ 44%] tests/parser/types/test_ast_node.py ... [ 44%] tests/parser/types/test_factor.py ...... [ 46%] tests/parser/types/test_formula_parser.py ........... [ 48%] tests/parser/types/test_operator.py ... [ 48%] tests/parser/types/test_operator_resolver.py . [ 49%] tests/parser/types/test_ordered_set.py . [ 49%] tests/parser/types/test_structured.py .............. [ 52%] tests/parser/types/test_term.py ....... [ 53%] tests/parser/types/test_token.py ........... [ 55%] tests/test_formula.py ................... [ 59%] tests/test_model_matrix.py .... [ 60%] tests/test_model_spec.py .FFFF.FFF..FFF. [ 63%] tests/test_sugar.py . [ 63%] tests/transforms/test_basis_spline.py ............. [ 65%] tests/transforms/test_contrasts.py ............................F. [ 71%] tests/transforms/test_cubic_spline.py .................................. [ 78%] ................ [ 81%] tests/transforms/test_hashed.py ........... [ 83%] tests/transforms/test_identity.py . [ 84%] tests/transforms/test_lag.py ........... [ 86%] tests/transforms/test_patsy_compat.py ... [ 86%] tests/transforms/test_poly.py ..... [ 87%] tests/transforms/test_scale.py ... [ 88%] tests/utils/test_calculus.py ... [ 88%] tests/utils/test_capture_context.py . [ 89%] tests/utils/test_cast.py . [ 89%] tests/utils/test_constraints.py ........................................ [ 97%] . [ 97%] tests/utils/test_iterators.py . [ 97%] tests/utils/test_layered_mapping.py .. [ 98%] tests/utils/test_null_handling.py .. [ 98%] tests/utils/test_sentinels.py . [ 98%] tests/utils/test_sparse.py . [ 98%] tests/utils/test_stateful_transforms.py ..... [ 99%] tests/utils/test_variables.py . [100%] =================================== FAILURES =================================== ____________ TestArrowMaterializer.test_get_model_matrix[A-tests1] _____________ self = materializer = formula = 'A' tests = (['Intercept', 'A[T.b]', 'A[T.c]'], ['Intercept', 'A[a]', 'A[b]', 'A[c]']) @pytest.mark.parametrize("formula,tests", ARROW_TESTS.items()) def test_get_model_matrix(self, materializer, formula, tests): mm = materializer.get_model_matrix(formula, ensure_full_rank=True) assert isinstance(mm, pandas.DataFrame) > assert mm.shape == (3, len(tests[0])) E assert (3, 2) == (3, 3) E E At index 1 diff: 2 != 3 E Use -v to get more diff tests/materializers/test_arrow.py:59: AssertionError ___________ TestArrowMaterializer.test_get_model_matrix[a:A-tests3] ____________ self = materializer = formula = 'a:A' tests = (['Intercept', 'a:A[a]', 'a:A[b]', 'a:A[c]'], ['Intercept', 'a:A[a]', 'a:A[b]', 'a:A[c]']) @pytest.mark.parametrize("formula,tests", ARROW_TESTS.items()) def test_get_model_matrix(self, materializer, formula, tests): mm = materializer.get_model_matrix(formula, ensure_full_rank=True) assert isinstance(mm, pandas.DataFrame) > assert mm.shape == (3, len(tests[0])) E assert (3, 2) == (3, 4) E E At index 1 diff: 2 != 4 E Use -v to get more diff tests/materializers/test_arrow.py:59: AssertionError _________ TestArrowMaterializer.test_get_model_matrix_sparse[A-tests1] _________ obj = ModelSpec(formula=1 + A, materializer='arrow', materializer_params={}, ensure_full_rank=True, na_action=, output='sparse', cluster_by=, structure=None, transform_state={}, encoder_state={}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = materializer = formula = 'A' tests = (['Intercept', 'A[T.b]', 'A[T.c]'], ['Intercept', 'A[a]', 'A[b]', 'A[c]']) @pytest.mark.parametrize("formula,tests", ARROW_TESTS.items()) def test_get_model_matrix_sparse(self, materializer, formula, tests): > mm = materializer.get_model_matrix( formula, ensure_full_rank=True, output="sparse" ) tests/materializers/test_arrow.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:248: in _build_model_matrix self._encode_evaled_factor( formulaic/materializers/base.py:716: in _encode_evaled_factor encoded = map_dict(self._encode_numerical)( formulaic/materializers/base.py:680: in wrapped return f(values, metadata, state, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/materializers/pandas.py:105: in _encode_numerical return spsparse.csc_matrix( /usr/lib64/python3.15/site-packages/scipy/sparse/_compressed.py:95: in __init__ coo = self._coo_container(arg1, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_coo.py:97: in __init__ self.data = getdata(M[coords], copy=copy, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:149: in getdata getdtype(data.dtype) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dtype = dtype('O'), a = None, default = None def getdtype(dtype, a=None, default=None): """Form a supported numpy dtype based on input arguments. Returns a valid ``numpy.dtype`` from `dtype` if not None, or else ``a.dtype`` if possible, or else the given `default` if not None, or else raise a ``TypeError``. The resulting ``dtype`` must be in ``supported_dtypes``: bool_, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble """ if dtype is None: try: newdtype = a.dtype except AttributeError as e: if default is not None: newdtype = np.dtype(default) else: raise TypeError("could not interpret data type") from e else: newdtype = np.dtype(dtype) if newdtype not in supported_dtypes: supported_dtypes_fmt = ", ".join(t.__name__ for t in supported_dtypes) > raise ValueError(f"scipy.sparse does not support dtype {newdtype}. " f"The only supported types are: {supported_dtypes_fmt}.") E ValueError: scipy.sparse does not support dtype object. The only supported types are: bool, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble. /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:136: ValueError ________ TestArrowMaterializer.test_get_model_matrix_sparse[a:A-tests3] ________ obj = ModelSpec(formula=1 + a:A, materializer='arrow', materializer_params={}, ensure_full_rank=True, na_action=, structure=None, transform_state={}, encoder_state={'a': (, {})}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = materializer = formula = 'a:A' tests = (['Intercept', 'a:A[a]', 'a:A[b]', 'a:A[c]'], ['Intercept', 'a:A[a]', 'a:A[b]', 'a:A[c]']) @pytest.mark.parametrize("formula,tests", ARROW_TESTS.items()) def test_get_model_matrix_sparse(self, materializer, formula, tests): > mm = materializer.get_model_matrix( formula, ensure_full_rank=True, output="sparse" ) tests/materializers/test_arrow.py:69: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:248: in _build_model_matrix self._encode_evaled_factor( formulaic/materializers/base.py:716: in _encode_evaled_factor encoded = map_dict(self._encode_numerical)( formulaic/materializers/base.py:680: in wrapped return f(values, metadata, state, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/materializers/pandas.py:105: in _encode_numerical return spsparse.csc_matrix( /usr/lib64/python3.15/site-packages/scipy/sparse/_compressed.py:95: in __init__ coo = self._coo_container(arg1, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_coo.py:97: in __init__ self.data = getdata(M[coords], copy=copy, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:149: in getdata getdtype(data.dtype) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dtype = dtype('O'), a = None, default = None def getdtype(dtype, a=None, default=None): """Form a supported numpy dtype based on input arguments. Returns a valid ``numpy.dtype`` from `dtype` if not None, or else ``a.dtype`` if possible, or else the given `default` if not None, or else raise a ``TypeError``. The resulting ``dtype`` must be in ``supported_dtypes``: bool_, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble """ if dtype is None: try: newdtype = a.dtype except AttributeError as e: if default is not None: newdtype = np.dtype(default) else: raise TypeError("could not interpret data type") from e else: newdtype = np.dtype(dtype) if newdtype not in supported_dtypes: supported_dtypes_fmt = ", ".join(t.__name__ for t in supported_dtypes) > raise ValueError(f"scipy.sparse does not support dtype {newdtype}. " f"The only supported types are: {supported_dtypes_fmt}.") E ValueError: scipy.sparse does not support dtype object. The only supported types are: bool, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble. /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:136: ValueError ____________ TestPandasMaterializer.test_get_model_matrix[A-tests1] ____________ self = materializer = formula = 'A' tests = (['Intercept', 'A[T.b]', 'A[T.c]'], ['Intercept', 'A[a]', 'A[b]', 'A[c]'], ['Intercept', 'A[T.c]'], 2) @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) def test_get_model_matrix(self, materializer, formula, tests): mm = materializer.get_model_matrix(formula, ensure_full_rank=True) assert isinstance(mm, pandas.DataFrame) > assert mm.shape == (3, len(tests[0])) E assert (3, 2) == (3, 3) E E At index 1 diff: 2 != 3 E Use -v to get more diff tests/materializers/test_pandas.py:141: AssertionError ___________ TestPandasMaterializer.test_get_model_matrix[A:a-tests3] ___________ self = materializer = formula = 'A:a' tests = (['Intercept', 'A[a]:a', 'A[b]:a', 'A[c]:a'], ['Intercept', 'A[a]:a', 'A[b]:a', 'A[c]:a'], ['Intercept', 'A[a]:a'], 1) @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) def test_get_model_matrix(self, materializer, formula, tests): mm = materializer.get_model_matrix(formula, ensure_full_rank=True) assert isinstance(mm, pandas.DataFrame) > assert mm.shape == (3, len(tests[0])) E assert (3, 2) == (3, 4) E E At index 1 diff: 2 != 4 E Use -v to get more diff tests/materializers/test_pandas.py:141: AssertionError ___________ TestPandasMaterializer.test_get_model_matrix[A:B-tests4] ___________ obj = ModelSpec(formula=1 + A:B, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'B': (, {})}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = materializer = formula = 'A:B' tests = (['Intercept', 'B[T.b]', 'B[T.c]', 'A[T.b]:B[a]', 'A[T.c]:B[a]', 'A[T.b]:B[b]', ...], ['Intercept', 'A[a]:B[a]', 'A[b]:B[a]', 'A[c]:B[a]', 'A[a]:B[b]', 'A[b]:B[b]', ...], ['Intercept'], 1) @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) def test_get_model_matrix(self, materializer, formula, tests): > mm = materializer.get_model_matrix(formula, ensure_full_rank=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/materializers/test_pandas.py:139: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:246: in _build_model_matrix self._get_columns_for_term( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = factors = [] spec = ModelSpec(formula=1 + A:B, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'B': (, {})}) scale = 1 @override def _get_columns_for_term( self, factors: List[Dict[str, Any]], spec: ModelSpec, scale: float = 1 ) -> Dict[str, Any]: out = {} names = [ ":".join(reversed(product)) for product in itertools.product(*reversed(factors)) ] # Pre-multiply factors with only one set of values (improves performance) solo_factors = {} indices = [] for i, factor in enumerate(factors): if len(factor) == 1: solo_factors.update(factor) indices.append(i) if solo_factors: for index in reversed(indices): factors.pop(index) if spec.output == "sparse": factors.append( { ":".join(solo_factors): functools.reduce( spsparse.csc_matrix.multiply, solo_factors.values() ) } ) else: factors.append( { > ":".join(solo_factors): functools.reduce( numpy.multiply, (numpy.asanyarray(p) for p in solo_factors.values()), ) } ) E TypeError: can't multiply sequence by non-int of type 'str' formulaic/materializers/pandas.py:169: TypeError ____________ TestPandasMaterializer.test_get_model_matrix[.-tests5] ____________ self = materializer = formula = '.' tests = (['Intercept', 'a', 'b', 'A[T.b]', 'A[T.c]', 'B[T.b]', ...], ['Intercept', 'a', 'b', 'A[a]', 'A[b]', 'A[c]', ...], ['Intercept', 'a', 'b'], 1) @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) def test_get_model_matrix(self, materializer, formula, tests): mm = materializer.get_model_matrix(formula, ensure_full_rank=True) assert isinstance(mm, pandas.DataFrame) > assert mm.shape == (3, len(tests[0])) E assert (3, 6) == (3, 7) E E At index 1 diff: 6 != 7 E Use -v to get more diff tests/materializers/test_pandas.py:141: AssertionError _________ TestPandasMaterializer.test_get_model_matrix_numpy[A-tests1] _________ self = materializer = formula = 'A' tests = (['Intercept', 'A[T.b]', 'A[T.c]'], ['Intercept', 'A[a]', 'A[b]', 'A[c]'], ['Intercept', 'A[T.c]'], 2) @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) def test_get_model_matrix_numpy(self, materializer, formula, tests): mm = materializer.get_model_matrix( formula, ensure_full_rank=True, output="numpy" ) assert isinstance(mm, numpy.ndarray) > assert mm.shape == (3, len(tests[0])) E assert (3, 2) == (3, 3) E E At index 1 diff: 2 != 3 E Use -v to get more diff tests/materializers/test_pandas.py:169: AssertionError ________ TestPandasMaterializer.test_get_model_matrix_numpy[A:a-tests3] ________ self = materializer = formula = 'A:a' tests = (['Intercept', 'A[a]:a', 'A[b]:a', 'A[c]:a'], ['Intercept', 'A[a]:a', 'A[b]:a', 'A[c]:a'], ['Intercept', 'A[a]:a'], 1) @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) def test_get_model_matrix_numpy(self, materializer, formula, tests): mm = materializer.get_model_matrix( formula, ensure_full_rank=True, output="numpy" ) assert isinstance(mm, numpy.ndarray) > assert mm.shape == (3, len(tests[0])) E assert (3, 2) == (3, 4) E E At index 1 diff: 2 != 4 E Use -v to get more diff tests/materializers/test_pandas.py:169: AssertionError ________ TestPandasMaterializer.test_get_model_matrix_numpy[A:B-tests4] ________ obj = ModelSpec(formula=1 + A:B, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'B': (, {})}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = materializer = formula = 'A:B' tests = (['Intercept', 'B[T.b]', 'B[T.c]', 'A[T.b]:B[a]', 'A[T.c]:B[a]', 'A[T.b]:B[b]', ...], ['Intercept', 'A[a]:B[a]', 'A[b]:B[a]', 'A[c]:B[a]', 'A[a]:B[b]', 'A[b]:B[b]', ...], ['Intercept'], 1) @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) def test_get_model_matrix_numpy(self, materializer, formula, tests): > mm = materializer.get_model_matrix( formula, ensure_full_rank=True, output="numpy" ) tests/materializers/test_pandas.py:165: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:246: in _build_model_matrix self._get_columns_for_term( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = factors = [] spec = ModelSpec(formula=1 + A:B, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'B': (, {})}) scale = 1 @override def _get_columns_for_term( self, factors: List[Dict[str, Any]], spec: ModelSpec, scale: float = 1 ) -> Dict[str, Any]: out = {} names = [ ":".join(reversed(product)) for product in itertools.product(*reversed(factors)) ] # Pre-multiply factors with only one set of values (improves performance) solo_factors = {} indices = [] for i, factor in enumerate(factors): if len(factor) == 1: solo_factors.update(factor) indices.append(i) if solo_factors: for index in reversed(indices): factors.pop(index) if spec.output == "sparse": factors.append( { ":".join(solo_factors): functools.reduce( spsparse.csc_matrix.multiply, solo_factors.values() ) } ) else: factors.append( { > ":".join(solo_factors): functools.reduce( numpy.multiply, (numpy.asanyarray(p) for p in solo_factors.values()), ) } ) E TypeError: can't multiply sequence by non-int of type 'str' formulaic/materializers/pandas.py:169: TypeError _________ TestPandasMaterializer.test_get_model_matrix_numpy[.-tests5] _________ self = materializer = formula = '.' tests = (['Intercept', 'a', 'b', 'A[T.b]', 'A[T.c]', 'B[T.b]', ...], ['Intercept', 'a', 'b', 'A[a]', 'A[b]', 'A[c]', ...], ['Intercept', 'a', 'b'], 1) @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) def test_get_model_matrix_numpy(self, materializer, formula, tests): mm = materializer.get_model_matrix( formula, ensure_full_rank=True, output="numpy" ) assert isinstance(mm, numpy.ndarray) > assert mm.shape == (3, len(tests[0])) E assert (3, 6) == (3, 7) E E At index 1 diff: 6 != 7 E Use -v to get more diff tests/materializers/test_pandas.py:169: AssertionError ________ TestPandasMaterializer.test_get_model_matrix_sparse[A-tests1] _________ obj = ModelSpec(formula=1 + A, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, output='sparse', cluster_by=, structure=None, transform_state={}, encoder_state={}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = materializer = formula = 'A' tests = (['Intercept', 'A[T.b]', 'A[T.c]'], ['Intercept', 'A[a]', 'A[b]', 'A[c]'], ['Intercept', 'A[T.c]'], 2) @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) def test_get_model_matrix_sparse(self, materializer, formula, tests): > mm = materializer.get_model_matrix( formula, ensure_full_rank=True, output="sparse" ) tests/materializers/test_pandas.py:179: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:248: in _build_model_matrix self._encode_evaled_factor( formulaic/materializers/base.py:716: in _encode_evaled_factor encoded = map_dict(self._encode_numerical)( formulaic/materializers/base.py:680: in wrapped return f(values, metadata, state, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/materializers/pandas.py:105: in _encode_numerical return spsparse.csc_matrix( /usr/lib64/python3.15/site-packages/scipy/sparse/_compressed.py:95: in __init__ coo = self._coo_container(arg1, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_coo.py:97: in __init__ self.data = getdata(M[coords], copy=copy, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:149: in getdata getdtype(data.dtype) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dtype = dtype('O'), a = None, default = None def getdtype(dtype, a=None, default=None): """Form a supported numpy dtype based on input arguments. Returns a valid ``numpy.dtype`` from `dtype` if not None, or else ``a.dtype`` if possible, or else the given `default` if not None, or else raise a ``TypeError``. The resulting ``dtype`` must be in ``supported_dtypes``: bool_, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble """ if dtype is None: try: newdtype = a.dtype except AttributeError as e: if default is not None: newdtype = np.dtype(default) else: raise TypeError("could not interpret data type") from e else: newdtype = np.dtype(dtype) if newdtype not in supported_dtypes: supported_dtypes_fmt = ", ".join(t.__name__ for t in supported_dtypes) > raise ValueError(f"scipy.sparse does not support dtype {newdtype}. " f"The only supported types are: {supported_dtypes_fmt}.") E ValueError: scipy.sparse does not support dtype object. The only supported types are: bool, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble. /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:136: ValueError _______ TestPandasMaterializer.test_get_model_matrix_sparse[A:a-tests3] ________ obj = ModelSpec(formula=1 + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, output='sparse', cluster_by=, structure=None, transform_state={}, encoder_state={}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = materializer = formula = 'A:a' tests = (['Intercept', 'A[a]:a', 'A[b]:a', 'A[c]:a'], ['Intercept', 'A[a]:a', 'A[b]:a', 'A[c]:a'], ['Intercept', 'A[a]:a'], 1) @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) def test_get_model_matrix_sparse(self, materializer, formula, tests): > mm = materializer.get_model_matrix( formula, ensure_full_rank=True, output="sparse" ) tests/materializers/test_pandas.py:179: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:248: in _build_model_matrix self._encode_evaled_factor( formulaic/materializers/base.py:716: in _encode_evaled_factor encoded = map_dict(self._encode_numerical)( formulaic/materializers/base.py:680: in wrapped return f(values, metadata, state, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/materializers/pandas.py:105: in _encode_numerical return spsparse.csc_matrix( /usr/lib64/python3.15/site-packages/scipy/sparse/_compressed.py:95: in __init__ coo = self._coo_container(arg1, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_coo.py:97: in __init__ self.data = getdata(M[coords], copy=copy, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:149: in getdata getdtype(data.dtype) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dtype = dtype('O'), a = None, default = None def getdtype(dtype, a=None, default=None): """Form a supported numpy dtype based on input arguments. Returns a valid ``numpy.dtype`` from `dtype` if not None, or else ``a.dtype`` if possible, or else the given `default` if not None, or else raise a ``TypeError``. The resulting ``dtype`` must be in ``supported_dtypes``: bool_, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble """ if dtype is None: try: newdtype = a.dtype except AttributeError as e: if default is not None: newdtype = np.dtype(default) else: raise TypeError("could not interpret data type") from e else: newdtype = np.dtype(dtype) if newdtype not in supported_dtypes: supported_dtypes_fmt = ", ".join(t.__name__ for t in supported_dtypes) > raise ValueError(f"scipy.sparse does not support dtype {newdtype}. " f"The only supported types are: {supported_dtypes_fmt}.") E ValueError: scipy.sparse does not support dtype object. The only supported types are: bool, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble. /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:136: ValueError _______ TestPandasMaterializer.test_get_model_matrix_sparse[A:B-tests4] ________ obj = ModelSpec(formula=1 + A:B, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, output='sparse', cluster_by=, structure=None, transform_state={}, encoder_state={}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = materializer = formula = 'A:B' tests = (['Intercept', 'B[T.b]', 'B[T.c]', 'A[T.b]:B[a]', 'A[T.c]:B[a]', 'A[T.b]:B[b]', ...], ['Intercept', 'A[a]:B[a]', 'A[b]:B[a]', 'A[c]:B[a]', 'A[a]:B[b]', 'A[b]:B[b]', ...], ['Intercept'], 1) @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) def test_get_model_matrix_sparse(self, materializer, formula, tests): > mm = materializer.get_model_matrix( formula, ensure_full_rank=True, output="sparse" ) tests/materializers/test_pandas.py:179: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:248: in _build_model_matrix self._encode_evaled_factor( formulaic/materializers/base.py:716: in _encode_evaled_factor encoded = map_dict(self._encode_numerical)( formulaic/materializers/base.py:680: in wrapped return f(values, metadata, state, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/materializers/pandas.py:105: in _encode_numerical return spsparse.csc_matrix( /usr/lib64/python3.15/site-packages/scipy/sparse/_compressed.py:95: in __init__ coo = self._coo_container(arg1, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_coo.py:97: in __init__ self.data = getdata(M[coords], copy=copy, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:149: in getdata getdtype(data.dtype) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dtype = dtype('O'), a = None, default = None def getdtype(dtype, a=None, default=None): """Form a supported numpy dtype based on input arguments. Returns a valid ``numpy.dtype`` from `dtype` if not None, or else ``a.dtype`` if possible, or else the given `default` if not None, or else raise a ``TypeError``. The resulting ``dtype`` must be in ``supported_dtypes``: bool_, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble """ if dtype is None: try: newdtype = a.dtype except AttributeError as e: if default is not None: newdtype = np.dtype(default) else: raise TypeError("could not interpret data type") from e else: newdtype = np.dtype(dtype) if newdtype not in supported_dtypes: supported_dtypes_fmt = ", ".join(t.__name__ for t in supported_dtypes) > raise ValueError(f"scipy.sparse does not support dtype {newdtype}. " f"The only supported types are: {supported_dtypes_fmt}.") E ValueError: scipy.sparse does not support dtype object. The only supported types are: bool, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble. /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:136: ValueError ________ TestPandasMaterializer.test_get_model_matrix_sparse[.-tests5] _________ obj = ModelSpec(formula=1 + a + b + A + B + D, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_acti...transform_state={}, encoder_state={'a': (, {}), 'b': (, {})}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = materializer = formula = '.' tests = (['Intercept', 'a', 'b', 'A[T.b]', 'A[T.c]', 'B[T.b]', ...], ['Intercept', 'a', 'b', 'A[a]', 'A[b]', 'A[c]', ...], ['Intercept', 'a', 'b'], 1) @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) def test_get_model_matrix_sparse(self, materializer, formula, tests): > mm = materializer.get_model_matrix( formula, ensure_full_rank=True, output="sparse" ) tests/materializers/test_pandas.py:179: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:248: in _build_model_matrix self._encode_evaled_factor( formulaic/materializers/base.py:716: in _encode_evaled_factor encoded = map_dict(self._encode_numerical)( formulaic/materializers/base.py:680: in wrapped return f(values, metadata, state, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/materializers/pandas.py:105: in _encode_numerical return spsparse.csc_matrix( /usr/lib64/python3.15/site-packages/scipy/sparse/_compressed.py:95: in __init__ coo = self._coo_container(arg1, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_coo.py:97: in __init__ self.data = getdata(M[coords], copy=copy, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:149: in getdata getdtype(data.dtype) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dtype = dtype('O'), a = None, default = None def getdtype(dtype, a=None, default=None): """Form a supported numpy dtype based on input arguments. Returns a valid ``numpy.dtype`` from `dtype` if not None, or else ``a.dtype`` if possible, or else the given `default` if not None, or else raise a ``TypeError``. The resulting ``dtype`` must be in ``supported_dtypes``: bool_, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble """ if dtype is None: try: newdtype = a.dtype except AttributeError as e: if default is not None: newdtype = np.dtype(default) else: raise TypeError("could not interpret data type") from e else: newdtype = np.dtype(dtype) if newdtype not in supported_dtypes: supported_dtypes_fmt = ", ".join(t.__name__ for t in supported_dtypes) > raise ValueError(f"scipy.sparse does not support dtype {newdtype}. " f"The only supported types are: {supported_dtypes_fmt}.") E ValueError: scipy.sparse does not support dtype object. The only supported types are: bool, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble. /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:136: ValueError ___________ TestPandasMaterializer.test_na_handling[pandas-A-tests1] ___________ self = data_with_nulls = a b A B D 0 1.0 1 a a a 1 2.0 2 NaN b a 2 NaN 3 c NaN a formula = 'A' tests = (['Intercept', 'A[T.b]', 'A[T.c]'], ['Intercept', 'A[a]', 'A[b]', 'A[c]'], ['Intercept', 'A[T.c]'], 2) output = 'pandas' @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) @pytest.mark.parametrize("output", ["pandas", "numpy", "sparse"]) def test_na_handling(self, data_with_nulls, formula, tests, output): mm = PandasMaterializer(data_with_nulls).get_model_matrix( formula, output=output ) if output == "pandas": assert isinstance(mm, pandas.DataFrame) > assert list(mm.columns) == tests[2] E AssertionError: assert ['Intercept', 'A'] == ['Intercept', 'A[T.c]'] E E At index 1 diff: 'A' != 'A[T.c]' E Use -v to get more diff tests/materializers/test_pandas.py:210: AssertionError __________ TestPandasMaterializer.test_na_handling[pandas-A:a-tests3] __________ obj = ModelSpec(formula=1 + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'a': (, {})}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = data_with_nulls = a b A B D 0 1.0 1 a a a 1 2.0 2 NaN b a 2 NaN 3 c NaN a formula = 'A:a' tests = (['Intercept', 'A[a]:a', 'A[b]:a', 'A[c]:a'], ['Intercept', 'A[a]:a', 'A[b]:a', 'A[c]:a'], ['Intercept', 'A[a]:a'], 1) output = 'pandas' @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) @pytest.mark.parametrize("output", ["pandas", "numpy", "sparse"]) def test_na_handling(self, data_with_nulls, formula, tests, output): > mm = PandasMaterializer(data_with_nulls).get_model_matrix( formula, output=output ) tests/materializers/test_pandas.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:246: in _build_model_matrix self._get_columns_for_term( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = factors = [] spec = ModelSpec(formula=1 + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'a': (, {})}) scale = 1 @override def _get_columns_for_term( self, factors: List[Dict[str, Any]], spec: ModelSpec, scale: float = 1 ) -> Dict[str, Any]: out = {} names = [ ":".join(reversed(product)) for product in itertools.product(*reversed(factors)) ] # Pre-multiply factors with only one set of values (improves performance) solo_factors = {} indices = [] for i, factor in enumerate(factors): if len(factor) == 1: solo_factors.update(factor) indices.append(i) if solo_factors: for index in reversed(indices): factors.pop(index) if spec.output == "sparse": factors.append( { ":".join(solo_factors): functools.reduce( spsparse.csc_matrix.multiply, solo_factors.values() ) } ) else: factors.append( { > ":".join(solo_factors): functools.reduce( numpy.multiply, (numpy.asanyarray(p) for p in solo_factors.values()), ) } ) E TypeError: can't multiply sequence by non-int of type 'float' formulaic/materializers/pandas.py:169: TypeError __________ TestPandasMaterializer.test_na_handling[pandas-A:B-tests4] __________ obj = ModelSpec(formula=1 + A:B, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'B': (, {})}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = data_with_nulls = a b A B D 0 1.0 1 a a a 1 2.0 2 NaN b a 2 NaN 3 c NaN a formula = 'A:B' tests = (['Intercept', 'B[T.b]', 'B[T.c]', 'A[T.b]:B[a]', 'A[T.c]:B[a]', 'A[T.b]:B[b]', ...], ['Intercept', 'A[a]:B[a]', 'A[b]:B[a]', 'A[c]:B[a]', 'A[a]:B[b]', 'A[b]:B[b]', ...], ['Intercept'], 1) output = 'pandas' @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) @pytest.mark.parametrize("output", ["pandas", "numpy", "sparse"]) def test_na_handling(self, data_with_nulls, formula, tests, output): > mm = PandasMaterializer(data_with_nulls).get_model_matrix( formula, output=output ) tests/materializers/test_pandas.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:246: in _build_model_matrix self._get_columns_for_term( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = factors = [] spec = ModelSpec(formula=1 + A:B, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'B': (, {})}) scale = 1 @override def _get_columns_for_term( self, factors: List[Dict[str, Any]], spec: ModelSpec, scale: float = 1 ) -> Dict[str, Any]: out = {} names = [ ":".join(reversed(product)) for product in itertools.product(*reversed(factors)) ] # Pre-multiply factors with only one set of values (improves performance) solo_factors = {} indices = [] for i, factor in enumerate(factors): if len(factor) == 1: solo_factors.update(factor) indices.append(i) if solo_factors: for index in reversed(indices): factors.pop(index) if spec.output == "sparse": factors.append( { ":".join(solo_factors): functools.reduce( spsparse.csc_matrix.multiply, solo_factors.values() ) } ) else: factors.append( { > ":".join(solo_factors): functools.reduce( numpy.multiply, (numpy.asanyarray(p) for p in solo_factors.values()), ) } ) E TypeError: can't multiply sequence by non-int of type 'str' formulaic/materializers/pandas.py:169: TypeError ___________ TestPandasMaterializer.test_na_handling[pandas-.-tests5] ___________ self = data_with_nulls = a b A B D 0 1.0 1 a a a 1 2.0 2 NaN b a 2 NaN 3 c NaN a formula = '.' tests = (['Intercept', 'a', 'b', 'A[T.b]', 'A[T.c]', 'B[T.b]', ...], ['Intercept', 'a', 'b', 'A[a]', 'A[b]', 'A[c]', ...], ['Intercept', 'a', 'b'], 1) output = 'pandas' @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) @pytest.mark.parametrize("output", ["pandas", "numpy", "sparse"]) def test_na_handling(self, data_with_nulls, formula, tests, output): mm = PandasMaterializer(data_with_nulls).get_model_matrix( formula, output=output ) if output == "pandas": assert isinstance(mm, pandas.DataFrame) > assert list(mm.columns) == tests[2] E AssertionError: assert ['Intercept',...'A', 'B', 'D'] == ['Intercept', 'a', 'b'] E E Left contains 3 more items, first extra item: 'A' E Use -v to get more diff tests/materializers/test_pandas.py:210: AssertionError ___________ TestPandasMaterializer.test_na_handling[numpy-A-tests1] ____________ self = data_with_nulls = a b A B D 0 1.0 1 a a a 1 2.0 2 NaN b a 2 NaN 3 c NaN a formula = 'A' tests = (['Intercept', 'A[T.b]', 'A[T.c]'], ['Intercept', 'A[a]', 'A[b]', 'A[c]'], ['Intercept', 'A[T.c]'], 2) output = 'numpy' @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) @pytest.mark.parametrize("output", ["pandas", "numpy", "sparse"]) def test_na_handling(self, data_with_nulls, formula, tests, output): mm = PandasMaterializer(data_with_nulls).get_model_matrix( formula, output=output ) if output == "pandas": assert isinstance(mm, pandas.DataFrame) assert list(mm.columns) == tests[2] elif output == "numpy": assert isinstance(mm, numpy.ndarray) else: assert isinstance(mm, spsparse.csc_matrix) assert mm.shape == (tests[3], len(tests[2])) > assert list(mm.model_spec.column_names) == tests[2] E AssertionError: assert ['Intercept', 'A'] == ['Intercept', 'A[T.c]'] E E At index 1 diff: 'A' != 'A[T.c]' E Use -v to get more diff tests/materializers/test_pandas.py:217: AssertionError __________ TestPandasMaterializer.test_na_handling[numpy-A:a-tests3] ___________ obj = ModelSpec(formula=1 + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'a': (, {})}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = data_with_nulls = a b A B D 0 1.0 1 a a a 1 2.0 2 NaN b a 2 NaN 3 c NaN a formula = 'A:a' tests = (['Intercept', 'A[a]:a', 'A[b]:a', 'A[c]:a'], ['Intercept', 'A[a]:a', 'A[b]:a', 'A[c]:a'], ['Intercept', 'A[a]:a'], 1) output = 'numpy' @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) @pytest.mark.parametrize("output", ["pandas", "numpy", "sparse"]) def test_na_handling(self, data_with_nulls, formula, tests, output): > mm = PandasMaterializer(data_with_nulls).get_model_matrix( formula, output=output ) tests/materializers/test_pandas.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:246: in _build_model_matrix self._get_columns_for_term( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = factors = [] spec = ModelSpec(formula=1 + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'a': (, {})}) scale = 1 @override def _get_columns_for_term( self, factors: List[Dict[str, Any]], spec: ModelSpec, scale: float = 1 ) -> Dict[str, Any]: out = {} names = [ ":".join(reversed(product)) for product in itertools.product(*reversed(factors)) ] # Pre-multiply factors with only one set of values (improves performance) solo_factors = {} indices = [] for i, factor in enumerate(factors): if len(factor) == 1: solo_factors.update(factor) indices.append(i) if solo_factors: for index in reversed(indices): factors.pop(index) if spec.output == "sparse": factors.append( { ":".join(solo_factors): functools.reduce( spsparse.csc_matrix.multiply, solo_factors.values() ) } ) else: factors.append( { > ":".join(solo_factors): functools.reduce( numpy.multiply, (numpy.asanyarray(p) for p in solo_factors.values()), ) } ) E TypeError: can't multiply sequence by non-int of type 'float' formulaic/materializers/pandas.py:169: TypeError __________ TestPandasMaterializer.test_na_handling[numpy-A:B-tests4] ___________ obj = ModelSpec(formula=1 + A:B, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'B': (, {})}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = data_with_nulls = a b A B D 0 1.0 1 a a a 1 2.0 2 NaN b a 2 NaN 3 c NaN a formula = 'A:B' tests = (['Intercept', 'B[T.b]', 'B[T.c]', 'A[T.b]:B[a]', 'A[T.c]:B[a]', 'A[T.b]:B[b]', ...], ['Intercept', 'A[a]:B[a]', 'A[b]:B[a]', 'A[c]:B[a]', 'A[a]:B[b]', 'A[b]:B[b]', ...], ['Intercept'], 1) output = 'numpy' @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) @pytest.mark.parametrize("output", ["pandas", "numpy", "sparse"]) def test_na_handling(self, data_with_nulls, formula, tests, output): > mm = PandasMaterializer(data_with_nulls).get_model_matrix( formula, output=output ) tests/materializers/test_pandas.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:246: in _build_model_matrix self._get_columns_for_term( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = factors = [] spec = ModelSpec(formula=1 + A:B, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'B': (, {})}) scale = 1 @override def _get_columns_for_term( self, factors: List[Dict[str, Any]], spec: ModelSpec, scale: float = 1 ) -> Dict[str, Any]: out = {} names = [ ":".join(reversed(product)) for product in itertools.product(*reversed(factors)) ] # Pre-multiply factors with only one set of values (improves performance) solo_factors = {} indices = [] for i, factor in enumerate(factors): if len(factor) == 1: solo_factors.update(factor) indices.append(i) if solo_factors: for index in reversed(indices): factors.pop(index) if spec.output == "sparse": factors.append( { ":".join(solo_factors): functools.reduce( spsparse.csc_matrix.multiply, solo_factors.values() ) } ) else: factors.append( { > ":".join(solo_factors): functools.reduce( numpy.multiply, (numpy.asanyarray(p) for p in solo_factors.values()), ) } ) E TypeError: can't multiply sequence by non-int of type 'str' formulaic/materializers/pandas.py:169: TypeError ___________ TestPandasMaterializer.test_na_handling[numpy-.-tests5] ____________ self = data_with_nulls = a b A B D 0 1.0 1 a a a 1 2.0 2 NaN b a 2 NaN 3 c NaN a formula = '.' tests = (['Intercept', 'a', 'b', 'A[T.b]', 'A[T.c]', 'B[T.b]', ...], ['Intercept', 'a', 'b', 'A[a]', 'A[b]', 'A[c]', ...], ['Intercept', 'a', 'b'], 1) output = 'numpy' @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) @pytest.mark.parametrize("output", ["pandas", "numpy", "sparse"]) def test_na_handling(self, data_with_nulls, formula, tests, output): mm = PandasMaterializer(data_with_nulls).get_model_matrix( formula, output=output ) if output == "pandas": assert isinstance(mm, pandas.DataFrame) assert list(mm.columns) == tests[2] elif output == "numpy": assert isinstance(mm, numpy.ndarray) else: assert isinstance(mm, spsparse.csc_matrix) > assert mm.shape == (tests[3], len(tests[2])) E assert (1, 6) == (1, 3) E E At index 1 diff: 6 != 3 E Use -v to get more diff tests/materializers/test_pandas.py:216: AssertionError ___________ TestPandasMaterializer.test_na_handling[sparse-A-tests1] ___________ obj = ModelSpec(formula=1 + A, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, output='sparse', cluster_by=, structure=None, transform_state={}, encoder_state={}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = data_with_nulls = a b A B D 0 1.0 1 a a a 1 2.0 2 NaN b a 2 NaN 3 c NaN a formula = 'A' tests = (['Intercept', 'A[T.b]', 'A[T.c]'], ['Intercept', 'A[a]', 'A[b]', 'A[c]'], ['Intercept', 'A[T.c]'], 2) output = 'sparse' @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) @pytest.mark.parametrize("output", ["pandas", "numpy", "sparse"]) def test_na_handling(self, data_with_nulls, formula, tests, output): > mm = PandasMaterializer(data_with_nulls).get_model_matrix( formula, output=output ) tests/materializers/test_pandas.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:248: in _build_model_matrix self._encode_evaled_factor( formulaic/materializers/base.py:716: in _encode_evaled_factor encoded = map_dict(self._encode_numerical)( formulaic/materializers/base.py:680: in wrapped return f(values, metadata, state, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/materializers/pandas.py:105: in _encode_numerical return spsparse.csc_matrix( /usr/lib64/python3.15/site-packages/scipy/sparse/_compressed.py:95: in __init__ coo = self._coo_container(arg1, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_coo.py:97: in __init__ self.data = getdata(M[coords], copy=copy, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:149: in getdata getdtype(data.dtype) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dtype = dtype('O'), a = None, default = None def getdtype(dtype, a=None, default=None): """Form a supported numpy dtype based on input arguments. Returns a valid ``numpy.dtype`` from `dtype` if not None, or else ``a.dtype`` if possible, or else the given `default` if not None, or else raise a ``TypeError``. The resulting ``dtype`` must be in ``supported_dtypes``: bool_, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble """ if dtype is None: try: newdtype = a.dtype except AttributeError as e: if default is not None: newdtype = np.dtype(default) else: raise TypeError("could not interpret data type") from e else: newdtype = np.dtype(dtype) if newdtype not in supported_dtypes: supported_dtypes_fmt = ", ".join(t.__name__ for t in supported_dtypes) > raise ValueError(f"scipy.sparse does not support dtype {newdtype}. " f"The only supported types are: {supported_dtypes_fmt}.") E ValueError: scipy.sparse does not support dtype object. The only supported types are: bool, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble. /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:136: ValueError __________ TestPandasMaterializer.test_na_handling[sparse-A:a-tests3] __________ obj = ModelSpec(formula=1 + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, output='sparse', cluster_by=, structure=None, transform_state={}, encoder_state={}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = data_with_nulls = a b A B D 0 1.0 1 a a a 1 2.0 2 NaN b a 2 NaN 3 c NaN a formula = 'A:a' tests = (['Intercept', 'A[a]:a', 'A[b]:a', 'A[c]:a'], ['Intercept', 'A[a]:a', 'A[b]:a', 'A[c]:a'], ['Intercept', 'A[a]:a'], 1) output = 'sparse' @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) @pytest.mark.parametrize("output", ["pandas", "numpy", "sparse"]) def test_na_handling(self, data_with_nulls, formula, tests, output): > mm = PandasMaterializer(data_with_nulls).get_model_matrix( formula, output=output ) tests/materializers/test_pandas.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:248: in _build_model_matrix self._encode_evaled_factor( formulaic/materializers/base.py:716: in _encode_evaled_factor encoded = map_dict(self._encode_numerical)( formulaic/materializers/base.py:680: in wrapped return f(values, metadata, state, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/materializers/pandas.py:105: in _encode_numerical return spsparse.csc_matrix( /usr/lib64/python3.15/site-packages/scipy/sparse/_compressed.py:95: in __init__ coo = self._coo_container(arg1, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_coo.py:97: in __init__ self.data = getdata(M[coords], copy=copy, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:149: in getdata getdtype(data.dtype) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dtype = dtype('O'), a = None, default = None def getdtype(dtype, a=None, default=None): """Form a supported numpy dtype based on input arguments. Returns a valid ``numpy.dtype`` from `dtype` if not None, or else ``a.dtype`` if possible, or else the given `default` if not None, or else raise a ``TypeError``. The resulting ``dtype`` must be in ``supported_dtypes``: bool_, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble """ if dtype is None: try: newdtype = a.dtype except AttributeError as e: if default is not None: newdtype = np.dtype(default) else: raise TypeError("could not interpret data type") from e else: newdtype = np.dtype(dtype) if newdtype not in supported_dtypes: supported_dtypes_fmt = ", ".join(t.__name__ for t in supported_dtypes) > raise ValueError(f"scipy.sparse does not support dtype {newdtype}. " f"The only supported types are: {supported_dtypes_fmt}.") E ValueError: scipy.sparse does not support dtype object. The only supported types are: bool, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble. /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:136: ValueError __________ TestPandasMaterializer.test_na_handling[sparse-A:B-tests4] __________ obj = ModelSpec(formula=1 + A:B, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, output='sparse', cluster_by=, structure=None, transform_state={}, encoder_state={}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = data_with_nulls = a b A B D 0 1.0 1 a a a 1 2.0 2 NaN b a 2 NaN 3 c NaN a formula = 'A:B' tests = (['Intercept', 'B[T.b]', 'B[T.c]', 'A[T.b]:B[a]', 'A[T.c]:B[a]', 'A[T.b]:B[b]', ...], ['Intercept', 'A[a]:B[a]', 'A[b]:B[a]', 'A[c]:B[a]', 'A[a]:B[b]', 'A[b]:B[b]', ...], ['Intercept'], 1) output = 'sparse' @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) @pytest.mark.parametrize("output", ["pandas", "numpy", "sparse"]) def test_na_handling(self, data_with_nulls, formula, tests, output): > mm = PandasMaterializer(data_with_nulls).get_model_matrix( formula, output=output ) tests/materializers/test_pandas.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:248: in _build_model_matrix self._encode_evaled_factor( formulaic/materializers/base.py:716: in _encode_evaled_factor encoded = map_dict(self._encode_numerical)( formulaic/materializers/base.py:680: in wrapped return f(values, metadata, state, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/materializers/pandas.py:105: in _encode_numerical return spsparse.csc_matrix( /usr/lib64/python3.15/site-packages/scipy/sparse/_compressed.py:95: in __init__ coo = self._coo_container(arg1, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_coo.py:97: in __init__ self.data = getdata(M[coords], copy=copy, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:149: in getdata getdtype(data.dtype) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dtype = dtype('O'), a = None, default = None def getdtype(dtype, a=None, default=None): """Form a supported numpy dtype based on input arguments. Returns a valid ``numpy.dtype`` from `dtype` if not None, or else ``a.dtype`` if possible, or else the given `default` if not None, or else raise a ``TypeError``. The resulting ``dtype`` must be in ``supported_dtypes``: bool_, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble """ if dtype is None: try: newdtype = a.dtype except AttributeError as e: if default is not None: newdtype = np.dtype(default) else: raise TypeError("could not interpret data type") from e else: newdtype = np.dtype(dtype) if newdtype not in supported_dtypes: supported_dtypes_fmt = ", ".join(t.__name__ for t in supported_dtypes) > raise ValueError(f"scipy.sparse does not support dtype {newdtype}. " f"The only supported types are: {supported_dtypes_fmt}.") E ValueError: scipy.sparse does not support dtype object. The only supported types are: bool, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble. /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:136: ValueError ___________ TestPandasMaterializer.test_na_handling[sparse-.-tests5] ___________ obj = ModelSpec(formula=1 + a + b + A + B + D, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_acti...transform_state={}, encoder_state={'a': (, {}), 'b': (, {})}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = data_with_nulls = a b A B D 0 1.0 1 a a a 1 2.0 2 NaN b a 2 NaN 3 c NaN a formula = '.' tests = (['Intercept', 'a', 'b', 'A[T.b]', 'A[T.c]', 'B[T.b]', ...], ['Intercept', 'a', 'b', 'A[a]', 'A[b]', 'A[c]', ...], ['Intercept', 'a', 'b'], 1) output = 'sparse' @pytest.mark.parametrize("formula,tests", PANDAS_TESTS.items()) @pytest.mark.parametrize("output", ["pandas", "numpy", "sparse"]) def test_na_handling(self, data_with_nulls, formula, tests, output): > mm = PandasMaterializer(data_with_nulls).get_model_matrix( formula, output=output ) tests/materializers/test_pandas.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:248: in _build_model_matrix self._encode_evaled_factor( formulaic/materializers/base.py:716: in _encode_evaled_factor encoded = map_dict(self._encode_numerical)( formulaic/materializers/base.py:680: in wrapped return f(values, metadata, state, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/materializers/pandas.py:105: in _encode_numerical return spsparse.csc_matrix( /usr/lib64/python3.15/site-packages/scipy/sparse/_compressed.py:95: in __init__ coo = self._coo_container(arg1, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_coo.py:97: in __init__ self.data = getdata(M[coords], copy=copy, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:149: in getdata getdtype(data.dtype) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dtype = dtype('O'), a = None, default = None def getdtype(dtype, a=None, default=None): """Form a supported numpy dtype based on input arguments. Returns a valid ``numpy.dtype`` from `dtype` if not None, or else ``a.dtype`` if possible, or else the given `default` if not None, or else raise a ``TypeError``. The resulting ``dtype`` must be in ``supported_dtypes``: bool_, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble """ if dtype is None: try: newdtype = a.dtype except AttributeError as e: if default is not None: newdtype = np.dtype(default) else: raise TypeError("could not interpret data type") from e else: newdtype = np.dtype(dtype) if newdtype not in supported_dtypes: supported_dtypes_fmt = ", ".join(t.__name__ for t in supported_dtypes) > raise ValueError(f"scipy.sparse does not support dtype {newdtype}. " f"The only supported types are: {supported_dtypes_fmt}.") E ValueError: scipy.sparse does not support dtype object. The only supported types are: bool, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble. /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:136: ValueError ___________ TestPandasMaterializer.test_factor_evaluation_edge_cases ___________ self = materializer = def test_factor_evaluation_edge_cases(self, materializer): # Test that categorical kinds are set if type would otherwise be numerical ev_factor = materializer._evaluate_factor( Factor("a", eval_method="lookup", kind="categorical"), ModelSpec(formula=[]), drop_rows=set(), ) assert ev_factor.metadata.kind.value == "categorical" # Test that other kind mismatches result in an exception materializer.factor_cache = {} > with pytest.raises( FactorEncodingError, match=re.escape( "Factor `A` is expecting values of kind 'numerical', but they are actually of kind 'categorical'." ), ): E Failed: DID NOT RAISE FactorEncodingError tests/materializers/test_pandas.py:266: Failed _________________ TestPandasMaterializer.test__is_categorical __________________ self = materializer = def test__is_categorical(self, materializer): assert materializer._is_categorical([1, 2, 3]) is False > assert materializer._is_categorical(pandas.Series(["a", "b", "c"])) is True E AssertionError: assert False is True E + where False = _is_categorical(0 a\n1 b\n2 c\ndtype: str) E + where _is_categorical = ._is_categorical E + and 0 a\n1 b\n2 c\ndtype: str = (['a', 'b', 'c']) E + where = pandas.Series tests/materializers/test_pandas.py:295: AssertionError _______________ TestPandasMaterializer.test_category_reordering ________________ self = def test_category_reordering(self): data = pandas.DataFrame({"A": ["a", "b", "c"]}) data2 = pandas.DataFrame({"A": ["c", "b", "a"]}) data3 = pandas.DataFrame( {"A": pandas.Categorical(["c", "b", "a"], categories=["c", "b", "a"])} ) m = PandasMaterializer(data).get_model_matrix("A + 0", ensure_full_rank=False) > assert list(m.columns) == ["A[a]", "A[b]", "A[c]"] E AssertionError: assert ['A'] == ['A[a]', 'A[b]', 'A[c]'] E E At index 0 diff: 'A' != 'A[a]' E Right contains 2 more items, first extra item: 'A[b]' E Use -v to get more diff tests/materializers/test_pandas.py:413: AssertionError _________________ TestPandasMaterializer.test_term_clustering __________________ self = materializer = def test_term_clustering(self, materializer): > assert materializer.get_model_matrix( "a + b + a:A + b:A" ).model_spec.column_names == ( "Intercept", "a", "b", "a:A[T.b]", "a:A[T.c]", "b:A[T.b]", "b:A[T.c]", ) E AssertionError: assert ('Intercept',... 'a:A', 'b:A') == ('Intercept',...:A[T.b]', ...) E E At index 3 diff: 'a:A' != 'a:A[T.b]' E Right contains 2 more items, first extra item: 'b:A[T.b]' E Use -v to get more diff tests/materializers/test_pandas.py:437: AssertionError ________________ TestPandasMaterializer.test_no_levels_encoding ________________ self = data = a b A B D 0 1 1 a a a 1 2 2 b b a 2 3 3 c c a def test_no_levels_encoding(self, data): mm = PandasMaterializer(data, output="pandas").get_model_matrix("a + D") > assert mm.model_spec.column_names == ("Intercept", "a") E AssertionError: assert ('Intercept', 'a', 'D') == ('Intercept', 'a') E E Left contains one more item: 'D' E Use -v to get more diff tests/materializers/test_pandas.py:472: AssertionError ________________________ TestModelSpec.test_attributes _________________________ self = model_spec = ModelSpec(formula=1 + a + A + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'A': (, {})}) @pytest.mark.filterwarnings( r"ignore:`ModelSpec\.feature_.*` is deprecated.*:DeprecationWarning" ) def test_attributes(self, model_spec): assert model_spec.formula == Formula("a + A + A:a") assert model_spec.ensure_full_rank is True assert model_spec.materializer == "pandas" > assert model_spec.column_names == ( "Intercept", "a", "A[T.b]", "A[T.c]", "A[T.b]:a", "A[T.c]:a", ) E AssertionError: assert ('Intercept', 'a', 'A', 'A:a') == ('Intercept',...', 'A[T.c]:a') E E At index 2 diff: 'A' != 'A[T.b]' E Right contains 2 more items, first extra item: 'A[T.b]:a' E Use -v to get more diff tests/test_model_spec.py:58: AssertionError ____________________ TestModelSpec.test_get_column_indices _____________________ self = model_spec = ModelSpec(formula=1 + a + A + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'A': (, {})}) def test_get_column_indices(self, model_spec): assert model_spec.get_column_indices("a") == [1] > assert model_spec.get_column_indices("A[T.b]:a") == [4] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/test_model_spec.py:112: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = ModelSpec(formula=1 + a + A + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'A': (, {})}) columns = ['A[T.b]:a'] def get_column_indices(self, columns: Union[str, Sequence[str]]) -> List[int]: """ Generate a list of column indices corresponding to the nominated column names. This is useful when you want to slice a model matrix by specific columns, and do not want to have to generate the indices yourself. Args: columns: The column names to include in the subset. """ if isinstance(columns, str): columns = [columns] > return [self.column_indices[column] for column in columns] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ E KeyError: 'A[T.b]:a' formulaic/model_spec.py:194: KeyError _____________________ TestModelSpec.test_get_term_indices ______________________ self = model_spec = ModelSpec(formula=1 + a + A + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'A': (, {})}) def test_get_term_indices(self, model_spec): assert model_spec.get_term_indices("a") == [0, 1] assert model_spec.get_term_indices(["a"]) == [1] > assert model_spec.get_term_indices("a + a:A") == [0, 1, 4, 5] E assert [0, 1, 3] == [0, 1, 4, 5] E E At index 2 diff: 3 != 4 E Right contains one more item: 5 E Use -v to get more diff tests/test_model_spec.py:118: AssertionError ___________________ TestModelSpec.test_get_variable_indices ____________________ self = model_spec = ModelSpec(formula=1 + a + A + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'A': (, {})}) def test_get_variable_indices(self, model_spec): > assert model_spec.get_variable_indices("a") == [1, 4, 5] E assert [1, 3] == [1, 4, 5] E E At index 1 diff: 3 != 4 E Right contains one more item: 5 E Use -v to get more diff tests/test_model_spec.py:123: AssertionError _________________________ TestModelSpec.test_get_slice _________________________ self = model_spec = ModelSpec(formula=1 + a + A + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'A': (, {})}) def test_get_slice(self, model_spec): s = slice(0, 1) assert model_spec.get_slice(s) is s assert model_spec.get_slice(0) == s assert model_spec.get_slice(model_spec.terms[1]) == slice(1, 2) > assert model_spec.get_slice("A") == slice(2, 4) E AssertionError: assert slice(2, 3, None) == slice(2, 4, None) E + where slice(2, 3, None) = get_slice('A') E + where get_slice = ModelSpec(formula=1 + a + A + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'A': (, {})}).get_slice E + and slice(2, 4, None) = slice(2, 4) tests/test_model_spec.py:138: AssertionError _____________________ TestModelSpec.test_get_model_matrix ______________________ obj = ModelSpec(formula=1 + a + A + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'A': (, {})}) context = ('root',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = model_spec = ModelSpec(formula=1 + a + A + A:a, materializer=None, materializer_params={}, ensure_full_rank=True, na_action=, {}), 'A': (, {})}) data2 = A a 0 a 0 1 a 0 2 a 1 def test_get_model_matrix(self, model_spec, data2): m = model_spec.get_model_matrix(data2) assert isinstance(m, pandas.DataFrame) assert model_spec.column_names == tuple(m.columns) model_spec = model_spec.update(materializer=None) m2 = model_spec.get_model_matrix(data2) assert isinstance(m2, pandas.DataFrame) assert model_spec.column_names == tuple(m2.columns) > m3 = model_spec.get_model_matrix(data2, output="sparse") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/test_model_spec.py:168: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/model_spec.py:527: in get_model_matrix return self.update(**attr_overrides).get_model_matrix(data, context=context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/model_spec.py:530: in get_model_matrix self.get_materializer(data, context=context).get_model_matrix( formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:248: in _build_model_matrix self._encode_evaled_factor( formulaic/materializers/base.py:716: in _encode_evaled_factor encoded = map_dict(self._encode_numerical)( formulaic/materializers/base.py:680: in wrapped return f(values, metadata, state, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/materializers/pandas.py:105: in _encode_numerical return spsparse.csc_matrix( /usr/lib64/python3.15/site-packages/scipy/sparse/_compressed.py:95: in __init__ coo = self._coo_container(arg1, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_coo.py:97: in __init__ self.data = getdata(M[coords], copy=copy, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:149: in getdata getdtype(data.dtype) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dtype = dtype('O'), a = None, default = None def getdtype(dtype, a=None, default=None): """Form a supported numpy dtype based on input arguments. Returns a valid ``numpy.dtype`` from `dtype` if not None, or else ``a.dtype`` if possible, or else the given `default` if not None, or else raise a ``TypeError``. The resulting ``dtype`` must be in ``supported_dtypes``: bool_, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble """ if dtype is None: try: newdtype = a.dtype except AttributeError as e: if default is not None: newdtype = np.dtype(default) else: raise TypeError("could not interpret data type") from e else: newdtype = np.dtype(dtype) if newdtype not in supported_dtypes: supported_dtypes_fmt = ", ".join(t.__name__ for t in supported_dtypes) > raise ValueError(f"scipy.sparse does not support dtype {newdtype}. " f"The only supported types are: {supported_dtypes_fmt}.") E ValueError: scipy.sparse does not support dtype object. The only supported types are: bool, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble. /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:136: ValueError __________________ TestModelSpec.test_get_linear_constraints ___________________ self = model_spec = ModelSpec(formula=1 + a + A + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'A': (, {})}) def test_get_linear_constraints(self, model_spec): > lc = model_spec.get_linear_constraints("`A[T.b]` - a = 3") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/test_model_spec.py:172: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/model_spec.py:544: in get_linear_constraints return LinearConstraints.from_spec(spec, variable_names=self.column_names) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/constraints.py:103: in from_spec ).get_matrix(spec) ^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = formula = '`A[T.b]` - a = 3' def get_matrix( self, formula: str ) -> Tuple["numpy.typing.ArrayLike", "numpy.typing.ArrayLike"]: """ Build the constraint matrix and constraint values vector associated with the parsed string. Args: formula: The constraint formula for which to build the constraint matrix and values vector. Returns: A tuple of the contraint matrix and constraint values respectively. """ constraints = self.get_terms(formula) if not constraints: return numpy.empty((0, len(self.variable_names))), numpy.array([]) if not isinstance(constraints, tuple): constraints = (constraints,) col_vectors = dict( zip(self.variable_names, numpy.eye(len(self.variable_names))) ) matrix = [] constants = [] for constraint in constraints: vector = numpy.zeros(len(self.variable_names)) constant: float = 0 for scaled_factor in constraint: if scaled_factor.factor == 1: constant += scaled_factor.scale else: vector += ( scaled_factor.scale > * col_vectors[cast(Factor, scaled_factor.factor).expr] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) E KeyError: 'A[T.b]' formulaic/utils/constraints.py:301: KeyError ____________________ TestModelSpec.test_unrepresented_term _____________________ self = def test_unrepresented_term(self): model_spec = ( Formula("A") .get_model_matrix(pandas.DataFrame({"A": ["a", "a", "a"]})) .model_spec ) > assert model_spec.term_indices == { "1": [0], "A": [], } E AssertionError: assert {1: [0], A: [1]} == {'1': [0], 'A': []} E E Omitting 1 identical items, use -vv to show E Differing items: E {'A': [1]} != {'A': []} E Use -v to get more diff tests/test_model_spec.py:232: AssertionError __________________________ TestModelSpec.test_subset ___________________________ self = model_spec = ModelSpec(formula=1 + a + A + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'A': (, {})}) data2 = A a 0 a 0 1 a 0 2 a 1 def test_subset(self, model_spec, data2): subset = model_spec.subset(["a"]) assert subset.formula == ["a"] assert subset.variables == {"a"} assert numpy.allclose( model_spec.get_model_matrix(data2).values[:, model_spec.get_slice("a")], subset.get_model_matrix(data2).values, ) subset = model_spec.subset(["a:A", "A"]) assert subset.formula == ["A", "a:A"] assert subset.variables == {"a", "A"} > assert numpy.allclose( model_spec.get_model_matrix(data2).values[ :, model_spec.get_term_indices(["A", "a:A"]) ], subset.get_model_matrix(data2).values, ) tests/test_model_spec.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.15/site-packages/numpy/_core/numeric.py:2312: in allclose res = all(isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ a = array([['a', ''], ['a', ''], ['a', 'a']], dtype=object) b = array([['a', ''], ['a', ''], ['a', 'a']], dtype=object) rtol = 1e-05, atol = 1e-08, equal_nan = False @array_function_dispatch(_isclose_dispatcher) def isclose(a, b, rtol=1.e-5, atol=1.e-8, equal_nan=False): """ Returns a boolean array where two arrays are element-wise equal within a tolerance. The tolerance values are positive, typically very small numbers. The relative difference (`rtol` * abs(`b`)) and the absolute difference `atol` are added together to compare against the absolute difference between `a` and `b`. .. warning:: The default `atol` is not appropriate for comparing numbers with magnitudes much smaller than one (see Notes). Parameters ---------- a, b : array_like Input arrays to compare. rtol : array_like The relative tolerance parameter (see Notes). atol : array_like The absolute tolerance parameter (see Notes). equal_nan : bool Whether to compare NaN's as equal. If True, NaN's in `a` will be considered equal to NaN's in `b` in the output array. Returns ------- y : array_like Returns a boolean array of where `a` and `b` are equal within the given tolerance. If both `a` and `b` are scalars, returns a single boolean value. See Also -------- allclose math.isclose Notes ----- For finite values, isclose uses the following equation to test whether two floating point values are equivalent.:: absolute(a - b) <= (atol + rtol * absolute(b)) Unlike the built-in `math.isclose`, the above equation is not symmetric in `a` and `b` -- it assumes `b` is the reference value -- so that `isclose(a, b)` might be different from `isclose(b, a)`. The default value of `atol` is not appropriate when the reference value `b` has magnitude smaller than one. For example, it is unlikely that ``a = 1e-9`` and ``b = 2e-9`` should be considered "close", yet ``isclose(1e-9, 2e-9)`` is ``True`` with default settings. Be sure to select `atol` for the use case at hand, especially for defining the threshold below which a non-zero value in `a` will be considered "close" to a very small or zero value in `b`. `isclose` is not defined for non-numeric data types. :class:`bool` is considered a numeric data-type for this purpose. Examples -------- >>> import numpy as np >>> np.isclose([1e10,1e-7], [1.00001e10,1e-8]) array([ True, False]) >>> np.isclose([1e10,1e-8], [1.00001e10,1e-9]) array([ True, True]) >>> np.isclose([1e10,1e-8], [1.0001e10,1e-9]) array([False, True]) >>> np.isclose([1.0, np.nan], [1.0, np.nan]) array([ True, False]) >>> np.isclose([1.0, np.nan], [1.0, np.nan], equal_nan=True) array([ True, True]) >>> np.isclose([1e-8, 1e-7], [0.0, 0.0]) array([ True, False]) >>> np.isclose([1e-100, 1e-7], [0.0, 0.0], atol=0.0) array([False, False]) >>> np.isclose([1e-10, 1e-10], [1e-20, 0.0]) array([ True, True]) >>> np.isclose([1e-10, 1e-10], [1e-20, 0.999999e-10], atol=0.0) array([False, True]) """ # Turn all but python scalars into arrays. x, y, atol, rtol = ( a if isinstance(a, (int, float, complex)) else asanyarray(a) for a in (a, b, atol, rtol)) # Make sure y is an inexact type to avoid bad behavior on abs(MIN_INT). # This will cause casting of x later. Also, make sure to allow subclasses # (e.g., for numpy.ma). # NOTE: We explicitly allow timedelta, which used to work. This could # possibly be deprecated. See also gh-18286. # timedelta works if `atol` is an integer or also a timedelta. # Although, the default tolerances are unlikely to be useful if (dtype := getattr(y, "dtype", None)) is not None and dtype.kind != "m": dt = multiarray.result_type(y, 1.) y = asanyarray(y, dtype=dt) elif isinstance(y, int): y = float(y) # atol and rtol can be arrays if not (np.all(np.isfinite(atol)) and np.all(np.isfinite(rtol))): err_s = np.geterr()["invalid"] err_msg = f"One of rtol or atol is not valid, atol: {atol}, rtol: {rtol}" if err_s == "warn": warnings.warn(err_msg, RuntimeWarning, stacklevel=2) elif err_s == "raise": raise FloatingPointError(err_msg) elif err_s == "print": print(err_msg) with errstate(invalid='ignore'): > result = (less_equal(abs(x - y), atol + rtol * abs(y)) ^^^^^ & isfinite(y) | (x == y)) E TypeError: unsupported operand type(s) for -: 'str' and 'str' /usr/lib64/python3.15/site-packages/numpy/_core/numeric.py:2443: TypeError ________________________ TestModelSpec.test_model_specs ________________________ obj = ModelSpec(formula=1 + a + A + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'A': (, {})}) context = ('a',) def apply_func(obj: Any, context: Tuple[Union[str, int], ...]) -> Any: if recurse and isinstance(obj, Structured): return obj._map(func, recurse=True, as_type=as_type, _context=context) if isinstance(obj, tuple): return tuple(apply_func(o, context + (i,)) for i, o in enumerate(obj)) try: > return func(obj, context) # type: ignore ^^^^^^^^^^^^^^^^^^ E TypeError: FormulaMaterializer.get_model_matrix..() takes 1 positional argument but 2 were given formulaic/utils/structured.py:187: TypeError During handling of the above exception, another exception occurred: self = model_spec = ModelSpec(formula=1 + a + A + A:a, materializer='pandas', materializer_params={}, ensure_full_rank=True, na_action=, {}), 'A': (, {})}) data2 = A a 0 a 0 1 a 0 2 a 1 def test_model_specs(self, model_spec, data2): model_specs = ModelSpecs(a=model_spec) assert isinstance(model_specs.get_model_matrix(data2), ModelMatrices) assert isinstance(model_specs.get_model_matrix(data2).a, ModelMatrix) assert numpy.all( model_specs.get_model_matrix(data2).a == model_spec.get_model_matrix(data2) ) assert model_specs.required_variables == {"a", "A"} > sparse_matrices = model_specs.get_model_matrix(data2, output="sparse") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tests/test_model_spec.py:285: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ formulaic/model_spec.py:714: in get_model_matrix return ModelSpec.from_spec(self, **attr_overrides).get_model_matrix( formulaic/model_spec.py:748: in get_model_matrix ).get_model_matrix(self) ^^^^^^^^^^^^^^^^^^^^^^ formulaic/materializers/base.py:198: in get_model_matrix model_specs._map( formulaic/utils/structured.py:193: in _map key: apply_func(obj, _context + (key,)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/utils/structured.py:189: in apply_func return func(obj) # type: ignore ^^^^^^^^^ formulaic/materializers/base.py:199: in lambda model_spec: self._build_model_matrix( formulaic/materializers/base.py:248: in _build_model_matrix self._encode_evaled_factor( formulaic/materializers/base.py:716: in _encode_evaled_factor encoded = map_dict(self._encode_numerical)( formulaic/materializers/base.py:680: in wrapped return f(values, metadata, state, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ formulaic/materializers/pandas.py:105: in _encode_numerical return spsparse.csc_matrix( /usr/lib64/python3.15/site-packages/scipy/sparse/_compressed.py:95: in __init__ coo = self._coo_container(arg1, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_coo.py:97: in __init__ self.data = getdata(M[coords], copy=copy, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:149: in getdata getdtype(data.dtype) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dtype = dtype('O'), a = None, default = None def getdtype(dtype, a=None, default=None): """Form a supported numpy dtype based on input arguments. Returns a valid ``numpy.dtype`` from `dtype` if not None, or else ``a.dtype`` if possible, or else the given `default` if not None, or else raise a ``TypeError``. The resulting ``dtype`` must be in ``supported_dtypes``: bool_, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble """ if dtype is None: try: newdtype = a.dtype except AttributeError as e: if default is not None: newdtype = np.dtype(default) else: raise TypeError("could not interpret data type") from e else: newdtype = np.dtype(dtype) if newdtype not in supported_dtypes: supported_dtypes_fmt = ", ".join(t.__name__ for t in supported_dtypes) > raise ValueError(f"scipy.sparse does not support dtype {newdtype}. " f"The only supported types are: {supported_dtypes_fmt}.") E ValueError: scipy.sparse does not support dtype object. The only supported types are: bool, int8, uint8, int16, uint16, int32, uint32, int64, uint64, longlong, ulonglong, float32, float64, longdouble, complex64, complex128, clongdouble. /usr/lib64/python3.15/site-packages/scipy/sparse/_sputils.py:136: ValueError __________________________ test_full_rankness_opt_out __________________________ def test_full_rankness_opt_out(): data = pandas.DataFrame({"A": ["a", "b", "c"]}) > assert model_matrix("A", data).model_spec.column_names == ( "Intercept", "A[T.b]", "A[T.c]", ) E AssertionError: assert ('Intercept', 'A') == ('Intercept',...b]', 'A[T.c]') E E At index 1 diff: 'A' != 'A[T.b]' E Right contains one more item: 'A[T.c]' E Use -v to get more diff tests/transforms/test_contrasts.py:960: AssertionError =============================== warnings summary =============================== tests/transforms/test_contrasts.py::TestContrastsTransform::test_basic_usage_and_state tests/transforms/test_contrasts.py::TestContrastsTransform::test_sparse tests/transforms/test_contrasts.py::TestContrastsTransform::test_empty_levels tests/transforms/test_contrasts.py::TestContrastsTransform::test_empty_levels tests/transforms/test_contrasts.py::TestContrastsTransform::test_empty_levels tests/transforms/test_contrasts.py::TestContrastsTransform::test_empty_levels /builddir/build/BUILD/python-formulaic-1.1.1-build/formulaic-1.1.1/formulaic/transforms/contrasts.py:163: Pandas4Warning: Constructing a Categorical with a dtype and values containing non-null entries not in that dtype's categories is deprecated and will raise in a future version. data = pandas.Series(pandas.Categorical(data, categories=levels)) tests/utils/test_sparse.py::test_sparse_category_encoding tests/utils/test_sparse.py::test_sparse_category_encoding /builddir/build/BUILD/python-formulaic-1.1.1-build/formulaic-1.1.1/formulaic/utils/sparse.py:28: Pandas4Warning: Constructing a Categorical with a dtype and values containing non-null entries not in that dtype's categories is deprecated and will raise in a future version. series = pandas.Categorical(series, levels) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/materializers/test_arrow.py::TestArrowMaterializer::test_get_model_matrix[A-tests1] FAILED tests/materializers/test_arrow.py::TestArrowMaterializer::test_get_model_matrix[a:A-tests3] FAILED tests/materializers/test_arrow.py::TestArrowMaterializer::test_get_model_matrix_sparse[A-tests1] FAILED tests/materializers/test_arrow.py::TestArrowMaterializer::test_get_model_matrix_sparse[a:A-tests3] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_get_model_matrix[A-tests1] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_get_model_matrix[A:a-tests3] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_get_model_matrix[A:B-tests4] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_get_model_matrix[.-tests5] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_get_model_matrix_numpy[A-tests1] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_get_model_matrix_numpy[A:a-tests3] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_get_model_matrix_numpy[A:B-tests4] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_get_model_matrix_numpy[.-tests5] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_get_model_matrix_sparse[A-tests1] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_get_model_matrix_sparse[A:a-tests3] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_get_model_matrix_sparse[A:B-tests4] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_get_model_matrix_sparse[.-tests5] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_na_handling[pandas-A-tests1] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_na_handling[pandas-A:a-tests3] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_na_handling[pandas-A:B-tests4] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_na_handling[pandas-.-tests5] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_na_handling[numpy-A-tests1] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_na_handling[numpy-A:a-tests3] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_na_handling[numpy-A:B-tests4] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_na_handling[numpy-.-tests5] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_na_handling[sparse-A-tests1] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_na_handling[sparse-A:a-tests3] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_na_handling[sparse-A:B-tests4] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_na_handling[sparse-.-tests5] FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_factor_evaluation_edge_cases FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test__is_categorical FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_category_reordering FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_term_clustering FAILED tests/materializers/test_pandas.py::TestPandasMaterializer::test_no_levels_encoding FAILED tests/test_model_spec.py::TestModelSpec::test_attributes - AssertionEr... FAILED tests/test_model_spec.py::TestModelSpec::test_get_column_indices - Key... FAILED tests/test_model_spec.py::TestModelSpec::test_get_term_indices - asser... FAILED tests/test_model_spec.py::TestModelSpec::test_get_variable_indices - a... FAILED tests/test_model_spec.py::TestModelSpec::test_get_slice - AssertionErr... FAILED tests/test_model_spec.py::TestModelSpec::test_get_model_matrix - Value... FAILED tests/test_model_spec.py::TestModelSpec::test_get_linear_constraints FAILED tests/test_model_spec.py::TestModelSpec::test_unrepresented_term - Ass... FAILED tests/test_model_spec.py::TestModelSpec::test_subset - TypeError: unsu... FAILED tests/test_model_spec.py::TestModelSpec::test_model_specs - ValueError... FAILED tests/transforms/test_contrasts.py::test_full_rankness_opt_out - Asser... ================= 44 failed, 463 passed, 8 warnings in 19.93s ================== RPM build errors: error: Bad exit status from /var/tmp/rpm-tmp.CDALGP (%check) Bad exit status from /var/tmp/rpm-tmp.CDALGP (%check) Child return code was: 1 EXCEPTION: [Error('Command failed: \n # /usr/bin/systemd-nspawn -q -M 982fdfd7508342f9bae3ac797d6dda3e -D /var/lib/mock/f45-build-56857-987/root -a -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf --bind=/dev/btrfs-control --bind=/dev/mapper/control --bind=/dev/fuse --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin \'--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"\' \'--setenv=PS1= \\s-\\v\\$ \' --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c \'/usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-formulaic.spec\'\n', 1)] Traceback (most recent call last): File "/usr/lib/python3.14/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.14/site-packages/mockbuild/util.py", line 610, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (cmd_pretty(command, env), output), child.returncode) mockbuild.exception.Error: Command failed: # /usr/bin/systemd-nspawn -q -M 982fdfd7508342f9bae3ac797d6dda3e -D /var/lib/mock/f45-build-56857-987/root -a -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.8_5kp0p_:/etc/resolv.conf --bind=/dev/btrfs-control --bind=/dev/mapper/control --bind=/dev/fuse --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin '--setenv=PROMPT_COMMAND=printf "\033]0;\007"' '--setenv=PS1= \s-\v\$ ' --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c '/usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-formulaic.spec'