Mock Version: 3.0
Mock Version: 3.0
Mock Version: 3.0
ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/python-datanommer-models.spec'], chrootPath='/var/lib/mock/f38-build-side-42-init-devel-509728-25493/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x3fccac7970>timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target noarch --nodeps /builddir/build/SPECS/python-datanommer-models.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False
Building target platforms: noarch
Building for target noarch
setting SOURCE_DATE_EPOCH=1674172800
Wrote: /builddir/build/SRPMS/python-datanommer-models-1.0.4-5.fc38.src.rpm
Child return code was: 0
ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --target noarch --nodeps /builddir/build/SPECS/python-datanommer-models.spec'], chrootPath='/var/lib/mock/f38-build-side-42-init-devel-509728-25493/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x3fccac7970>timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueraiseExc=FalseprintOutput=False)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -br --target noarch --nodeps /builddir/build/SPECS/python-datanommer-models.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False
Building target platforms: noarch
Building for target noarch
setting SOURCE_DATE_EPOCH=1674172800
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.EDolbB
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf datanommer.models-1.0.4
+ /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/datanommer.models-1.0.4.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd datanommer.models-1.0.4
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ rm -rf '*.egg-info'
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.uPwHmr
+ umask 022
+ cd /builddir/build/BUILD
+ cd datanommer.models-1.0.4
+ 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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer '
+ export CXXFLAGS
+ FFLAGS='-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules '
+ export FFLAGS
+ FCFLAGS='-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules '
+ export FCFLAGS
+ VALAFLAGS=-g
+ export VALAFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -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
+ echo pyproject-rpm-macros
+ echo python3-devel
+ echo 'python3dist(pip) >= 19'
+ echo 'python3dist(packaging)'
+ '[' -f pyproject.toml ']'
+ echo '(python3dist(toml) if python3-devel < 3.11)'
+ rm -rfv '*.dist-info/'
+ '[' -f /usr/bin/python3 ']'
+ mkdir -p /builddir/build/BUILD/datanommer.models-1.0.4/.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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-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-annobin-cc1  -Wl,--build-id=sha1  '
+ TMPDIR=/builddir/build/BUILD/datanommer.models-1.0.4/.pyproject-builddir
+ RPM_TOXENV=py311
+ HOSTNAME=rpmbuild
+ /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/datanommer.models-1.0.4/pyproject-wheeldir
Handling poetry-core>=1.0.0 from build-system.requires
Requirement not satisfied: poetry-core>=1.0.0
Exiting dependency generation pass: build backend
+ rm -rfv '*.dist-info/'
+ RPM_EC=0
++ jobs -p
+ exit 0
Wrote: /builddir/build/SRPMS/python-datanommer-models-1.0.4-5.fc38.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 --target noarch --nodeps /builddir/build/SPECS/python-datanommer-models.spec'], chrootPath='/var/lib/mock/f38-build-side-42-init-devel-509728-25493/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x3fccac7970>timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueraiseExc=FalseprintOutput=False)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -br --target noarch --nodeps /builddir/build/SPECS/python-datanommer-models.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False
Building target platforms: noarch
Building for target noarch
setting SOURCE_DATE_EPOCH=1674172800
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.DpxGmJ
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf datanommer.models-1.0.4
+ /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/datanommer.models-1.0.4.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd datanommer.models-1.0.4
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ rm -rf '*.egg-info'
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.xA6tiJ
+ umask 022
+ cd /builddir/build/BUILD
+ cd datanommer.models-1.0.4
+ 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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer '
+ export CXXFLAGS
+ FFLAGS='-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules '
+ export FFLAGS
+ FCFLAGS='-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules '
+ export FCFLAGS
+ VALAFLAGS=-g
+ export VALAFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -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
+ echo pyproject-rpm-macros
+ echo python3-devel
+ echo 'python3dist(pip) >= 19'
+ echo 'python3dist(packaging)'
+ '[' -f pyproject.toml ']'
+ echo '(python3dist(toml) if python3-devel < 3.11)'
+ rm -rfv '*.dist-info/'
+ '[' -f /usr/bin/python3 ']'
+ mkdir -p /builddir/build/BUILD/datanommer.models-1.0.4/.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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-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-annobin-cc1  -Wl,--build-id=sha1  '
+ TMPDIR=/builddir/build/BUILD/datanommer.models-1.0.4/.pyproject-builddir
+ RPM_TOXENV=py311
+ HOSTNAME=rpmbuild
+ /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/datanommer.models-1.0.4/pyproject-wheeldir
Handling poetry-core>=1.0.0 from build-system.requires
Requirement satisfied: poetry-core>=1.0.0
   (installed: poetry-core 1.4.0)
Handling SQLAlchemy (>=1.3.24,<2.0.0) from hook generated metadata: Requires-Dist
Requirement not satisfied: SQLAlchemy (>=1.3.24,<2.0.0)
Handling alembic (>=1.6.5,<2.0.0) from hook generated metadata: Requires-Dist
Requirement not satisfied: alembic (>=1.6.5,<2.0.0)
Handling anitya-schema ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: anitya-schema ; extra == "schemas"
Handling bodhi-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: bodhi-messages ; extra == "schemas"
Handling copr-messaging ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: copr-messaging ; extra == "schemas"
Handling discourse2fedmsg-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: discourse2fedmsg-messages ; extra == "schemas"
Handling fedocal-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: fedocal-messages ; extra == "schemas"
Handling fedora-messaging (>=2.1.0) from hook generated metadata: Requires-Dist
Requirement satisfied: fedora-messaging (>=2.1.0)
   (installed: fedora-messaging 3.3.0)
Handling fedora-messaging-the-new-hotness-schema ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: fedora-messaging-the-new-hotness-schema ; extra == "schemas"
Handling fedora-planet-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: fedora-planet-messages ; extra == "schemas"
Handling fedorainfra-ansible-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: fedorainfra-ansible-messages ; extra == "schemas"
Handling mdapi-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: mdapi-messages ; extra == "schemas"
Handling noggin-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: noggin-messages ; extra == "schemas"
Handling nuancier-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: nuancier-messages ; extra == "schemas"
Handling pagure-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: pagure-messages ; extra == "schemas"
Handling psycopg2 (>=2.9.1,<3.0.0) from hook generated metadata: Requires-Dist
Requirement not satisfied: psycopg2 (>=2.9.1,<3.0.0)
+ rm -rfv datanommer_models-1.0.4.dist-info/
removed 'datanommer_models-1.0.4.dist-info/LICENSE'
removed 'datanommer_models-1.0.4.dist-info/WHEEL'
removed 'datanommer_models-1.0.4.dist-info/METADATA'
removed directory 'datanommer_models-1.0.4.dist-info/'
+ RPM_EC=0
++ jobs -p
+ exit 0
Wrote: /builddir/build/SRPMS/python-datanommer-models-1.0.4-5.fc38.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 --target noarch --nodeps /builddir/build/SPECS/python-datanommer-models.spec'], chrootPath='/var/lib/mock/f38-build-side-42-init-devel-509728-25493/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x3fccac7970>timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueraiseExc=FalseprintOutput=False)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -br --target noarch --nodeps /builddir/build/SPECS/python-datanommer-models.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False
Building target platforms: noarch
Building for target noarch
setting SOURCE_DATE_EPOCH=1674172800
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.dXVrwE
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf datanommer.models-1.0.4
+ /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/datanommer.models-1.0.4.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd datanommer.models-1.0.4
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ rm -rf '*.egg-info'
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.KGU3rH
+ umask 022
+ cd /builddir/build/BUILD
+ cd datanommer.models-1.0.4
+ 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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer '
+ export CXXFLAGS
+ FFLAGS='-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules '
+ export FFLAGS
+ FCFLAGS='-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules '
+ export FCFLAGS
+ VALAFLAGS=-g
+ export VALAFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -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
+ echo pyproject-rpm-macros
+ echo python3-devel
+ echo 'python3dist(pip) >= 19'
+ echo 'python3dist(packaging)'
+ '[' -f pyproject.toml ']'
+ echo '(python3dist(toml) if python3-devel < 3.11)'
+ rm -rfv '*.dist-info/'
+ '[' -f /usr/bin/python3 ']'
+ mkdir -p /builddir/build/BUILD/datanommer.models-1.0.4/.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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-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-annobin-cc1  -Wl,--build-id=sha1  '
+ TMPDIR=/builddir/build/BUILD/datanommer.models-1.0.4/.pyproject-builddir
+ RPM_TOXENV=py311
+ HOSTNAME=rpmbuild
+ /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/datanommer.models-1.0.4/pyproject-wheeldir
Handling poetry-core>=1.0.0 from build-system.requires
Requirement satisfied: poetry-core>=1.0.0
   (installed: poetry-core 1.4.0)
Handling SQLAlchemy (>=1.3.24,<2.0.0) from hook generated metadata: Requires-Dist
Requirement satisfied: SQLAlchemy (>=1.3.24,<2.0.0)
   (installed: SQLAlchemy 1.4.46)
Handling alembic (>=1.6.5,<2.0.0) from hook generated metadata: Requires-Dist
Requirement satisfied: alembic (>=1.6.5,<2.0.0)
   (installed: alembic 1.9.3)
Handling anitya-schema ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: anitya-schema ; extra == "schemas"
Handling bodhi-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: bodhi-messages ; extra == "schemas"
Handling copr-messaging ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: copr-messaging ; extra == "schemas"
Handling discourse2fedmsg-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: discourse2fedmsg-messages ; extra == "schemas"
Handling fedocal-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: fedocal-messages ; extra == "schemas"
Handling fedora-messaging (>=2.1.0) from hook generated metadata: Requires-Dist
Requirement satisfied: fedora-messaging (>=2.1.0)
   (installed: fedora-messaging 3.3.0)
Handling fedora-messaging-the-new-hotness-schema ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: fedora-messaging-the-new-hotness-schema ; extra == "schemas"
Handling fedora-planet-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: fedora-planet-messages ; extra == "schemas"
Handling fedorainfra-ansible-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: fedorainfra-ansible-messages ; extra == "schemas"
Handling mdapi-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: mdapi-messages ; extra == "schemas"
Handling noggin-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: noggin-messages ; extra == "schemas"
Handling nuancier-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: nuancier-messages ; extra == "schemas"
Handling pagure-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: pagure-messages ; extra == "schemas"
Handling psycopg2 (>=2.9.1,<3.0.0) from hook generated metadata: Requires-Dist
Requirement satisfied: psycopg2 (>=2.9.1,<3.0.0)
   (installed: psycopg2 2.9.3)
+ rm -rfv datanommer_models-1.0.4.dist-info/
removed 'datanommer_models-1.0.4.dist-info/LICENSE'
removed 'datanommer_models-1.0.4.dist-info/WHEEL'
removed 'datanommer_models-1.0.4.dist-info/METADATA'
removed directory 'datanommer_models-1.0.4.dist-info/'
+ RPM_EC=0
++ jobs -p
+ exit 0
Wrote: /builddir/build/SRPMS/python-datanommer-models-1.0.4-5.fc38.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 --target noarch --nodeps /builddir/build/SPECS/python-datanommer-models.spec'], chrootPath='/var/lib/mock/f38-build-side-42-init-devel-509728-25493/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=<mockbuild.trace_decorator.getLog object at 0x3fccac7970>timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False)
Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -ba --noprep --target noarch --nodeps /builddir/build/SPECS/python-datanommer-models.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False
Building target platforms: noarch
Building for target noarch
setting SOURCE_DATE_EPOCH=1674172800
Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.UqY2qy
+ umask 022
+ cd /builddir/build/BUILD
+ cd datanommer.models-1.0.4
+ 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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer '
+ export CXXFLAGS
+ FFLAGS='-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules '
+ export FFLAGS
+ FCFLAGS='-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules '
+ export FCFLAGS
+ VALAFLAGS=-g
+ export VALAFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -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
+ echo pyproject-rpm-macros
+ echo python3-devel
+ echo 'python3dist(pip) >= 19'
+ echo 'python3dist(packaging)'
+ '[' -f pyproject.toml ']'
+ echo '(python3dist(toml) if python3-devel < 3.11)'
+ rm -rfv '*.dist-info/'
+ '[' -f /usr/bin/python3 ']'
+ mkdir -p /builddir/build/BUILD/datanommer.models-1.0.4/.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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-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-annobin-cc1  -Wl,--build-id=sha1  '
+ TMPDIR=/builddir/build/BUILD/datanommer.models-1.0.4/.pyproject-builddir
+ RPM_TOXENV=py311
+ HOSTNAME=rpmbuild
+ /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/datanommer.models-1.0.4/pyproject-wheeldir
Handling poetry-core>=1.0.0 from build-system.requires
Requirement satisfied: poetry-core>=1.0.0
   (installed: poetry-core 1.4.0)
Handling SQLAlchemy (>=1.3.24,<2.0.0) from hook generated metadata: Requires-Dist
Requirement satisfied: SQLAlchemy (>=1.3.24,<2.0.0)
   (installed: SQLAlchemy 1.4.46)
Handling alembic (>=1.6.5,<2.0.0) from hook generated metadata: Requires-Dist
Requirement satisfied: alembic (>=1.6.5,<2.0.0)
   (installed: alembic 1.9.3)
Handling anitya-schema ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: anitya-schema ; extra == "schemas"
Handling bodhi-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: bodhi-messages ; extra == "schemas"
Handling copr-messaging ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: copr-messaging ; extra == "schemas"
Handling discourse2fedmsg-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: discourse2fedmsg-messages ; extra == "schemas"
Handling fedocal-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: fedocal-messages ; extra == "schemas"
Handling fedora-messaging (>=2.1.0) from hook generated metadata: Requires-Dist
Requirement satisfied: fedora-messaging (>=2.1.0)
   (installed: fedora-messaging 3.3.0)
Handling fedora-messaging-the-new-hotness-schema ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: fedora-messaging-the-new-hotness-schema ; extra == "schemas"
Handling fedora-planet-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: fedora-planet-messages ; extra == "schemas"
Handling fedorainfra-ansible-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: fedorainfra-ansible-messages ; extra == "schemas"
Handling mdapi-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: mdapi-messages ; extra == "schemas"
Handling noggin-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: noggin-messages ; extra == "schemas"
Handling nuancier-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: nuancier-messages ; extra == "schemas"
Handling pagure-messages ; extra == "schemas" from hook generated metadata: Requires-Dist
Ignoring alien requirement: pagure-messages ; extra == "schemas"
Handling psycopg2 (>=2.9.1,<3.0.0) from hook generated metadata: Requires-Dist
Requirement satisfied: psycopg2 (>=2.9.1,<3.0.0)
   (installed: psycopg2 2.9.3)
+ rm -rfv datanommer_models-1.0.4.dist-info/
removed 'datanommer_models-1.0.4.dist-info/LICENSE'
removed 'datanommer_models-1.0.4.dist-info/WHEEL'
removed 'datanommer_models-1.0.4.dist-info/METADATA'
removed directory 'datanommer_models-1.0.4.dist-info/'
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.1HntVG
+ umask 022
+ cd /builddir/build/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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer '
+ export CXXFLAGS
+ FFLAGS='-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules '
+ export FFLAGS
+ FCFLAGS='-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules '
+ export FCFLAGS
+ VALAFLAGS=-g
+ export VALAFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -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 datanommer.models-1.0.4
+ mkdir -p /builddir/build/BUILD/datanommer.models-1.0.4/.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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-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-annobin-cc1  -Wl,--build-id=sha1  '
+ TMPDIR=/builddir/build/BUILD/datanommer.models-1.0.4/.pyproject-builddir
+ /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_wheel.py /builddir/build/BUILD/datanommer.models-1.0.4/pyproject-wheeldir
Processing /builddir/build/BUILD/datanommer.models-1.0.4
  Preparing metadata (pyproject.toml): started
  Running command Preparing metadata (pyproject.toml)
  Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: datanommer-models
  Building wheel for datanommer-models (pyproject.toml): started
  Running command Building wheel for datanommer-models (pyproject.toml)
  Building wheel for datanommer-models (pyproject.toml): finished with status 'done'
  Created wheel for datanommer-models: filename=datanommer_models-1.0.4-py3-none-any.whl size=23723 sha256=dce6f120b840e62bb401f061e934f38d913d0671d3f1155274730896add51632
  Stored in directory: /builddir/.cache/pip/wheels/e6/6b/44/08d3d60541b36617945e80013bdb6fe517a5a77368753ef336
Successfully built datanommer-models
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.yxa2lp
+ umask 022
+ cd /builddir/build/BUILD
+ '[' /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch '!=' / ']'
+ rm -rf /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch
++ dirname /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch
+ mkdir -p /builddir/build/BUILDROOT
+ mkdir /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch
+ 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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer '
+ export CXXFLAGS
+ FFLAGS='-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules '
+ export FFLAGS
+ FCFLAGS='-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules '
+ export FCFLAGS
+ VALAFLAGS=-g
+ export VALAFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -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 datanommer.models-1.0.4
++ xargs basename --multiple
++ ls /builddir/build/BUILD/datanommer.models-1.0.4/pyproject-wheeldir/datanommer_models-1.0.4-py3-none-any.whl
++ sed -E 's/([^-]+)-([^-]+)-.+\.whl/\1==\2/'
+ specifier=datanommer_models==1.0.4
+ TMPDIR=/builddir/build/BUILD/datanommer.models-1.0.4/.pyproject-builddir
+ /usr/bin/python3 -m pip install --root /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch --prefix /usr --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location --no-index --no-cache-dir --find-links /builddir/build/BUILD/datanommer.models-1.0.4/pyproject-wheeldir datanommer_models==1.0.4
Using pip 22.3.1 from /usr/lib/python3.11/site-packages/pip (python 3.11)
Looking in links: /builddir/build/BUILD/datanommer.models-1.0.4/pyproject-wheeldir
Processing ./pyproject-wheeldir/datanommer_models-1.0.4-py3-none-any.whl
Installing collected packages: datanommer_models
Successfully installed datanommer_models-1.0.4
+ '[' -d /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/bin ']'
+ rm -f /builddir/build/BUILD/python-datanommer-models-1.0.4-5.fc38.noarch-pyproject-ghost-distinfo
+ site_dirs=()
+ '[' -d /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages ']'
+ site_dirs+=("/usr/lib/python3.11/site-packages")
+ '[' /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib64/python3.11/site-packages '!=' /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages ']'
+ '[' -d /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib64/python3.11/site-packages ']'
+ for site_dir in ${site_dirs[@]}
+ for distinfo in /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch$site_dir/*.dist-info
+ echo '%ghost /usr/lib/python3.11/site-packages/datanommer_models-1.0.4.dist-info'
+ sed -i s/pip/rpm/ /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer_models-1.0.4.dist-info/INSTALLER
+ PYTHONPATH=/usr/lib/rpm/redhat
+ /usr/bin/python3 -B /usr/lib/rpm/redhat/pyproject_preprocess_record.py --buildroot /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch --record /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer_models-1.0.4.dist-info/RECORD --output /builddir/build/BUILD/python-datanommer-models-1.0.4-5.fc38.noarch-pyproject-record
+ rm -fv /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer_models-1.0.4.dist-info/RECORD
removed '/builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer_models-1.0.4.dist-info/RECORD'
+ rm -fv /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer_models-1.0.4.dist-info/REQUESTED
removed '/builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer_models-1.0.4.dist-info/REQUESTED'
++ wc -l /builddir/build/BUILD/python-datanommer-models-1.0.4-5.fc38.noarch-pyproject-ghost-distinfo
++ cut -f1 '-d '
+ lines=1
+ '[' 1 -ne 1 ']'
+ /usr/bin/python3 /usr/lib/rpm/redhat/pyproject_save_files.py --output-files /builddir/build/BUILD/python-datanommer-models-1.0.4-5.fc38.noarch-pyproject-files --output-modules /builddir/build/BUILD/python-datanommer-models-1.0.4-5.fc38.noarch-pyproject-modules --buildroot /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch --sitelib /usr/lib/python3.11/site-packages --sitearch /usr/lib64/python3.11/site-packages --python-version 3.11 --pyproject-record /builddir/build/BUILD/python-datanommer-models-1.0.4-5.fc38.noarch-pyproject-record --prefix /usr datanommer
+ /usr/bin/mkdir -p /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/etc/datanommer-models
+ install -m 644 alembic.ini /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/etc/datanommer-models/alembic.ini
+ /usr/bin/find-debuginfo -j8 --strict-build-id -m -i --build-id-seed 1.0.4-5.fc38 --unique-debug-suffix -1.0.4-5.fc38.noarch --unique-debug-src-base python-datanommer-models-1.0.4-5.fc38.noarch --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/datanommer.models-1.0.4
find: 'debug': No such file or directory
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-ldconfig
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/check-rpaths
+ /usr/lib/rpm/redhat/brp-mangle-shebangs
+ /usr/lib/rpm/brp-remove-la-files
+ env /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 -j8
Bytecompiling .py files below /builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11 using python3.11
+ /usr/lib/rpm/redhat/brp-python-hardlink
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.ca4qZO
+ umask 022
+ cd /builddir/build/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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer '
+ export CXXFLAGS
+ FFLAGS='-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules '
+ export FFLAGS
+ FCFLAGS='-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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules '
+ export FCFLAGS
+ VALAFLAGS=-g
+ export VALAFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -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 datanommer.models-1.0.4
+ '[' '!' -f /builddir/build/BUILD/python-datanommer-models-1.0.4-5.fc38.noarch-pyproject-modules ']'
+ PATH=/builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
+ PYTHONPATH=/builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib64/python3.11/site-packages:/builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages
+ _PYTHONSITE=/builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib64/python3.11/site-packages:/builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages
+ PYTHONDONTWRITEBYTECODE=1
+ /usr/bin/python3 -sP /usr/lib/rpm/redhat/import_all_modules.py -f /builddir/build/BUILD/python-datanommer-models-1.0.4-5.fc38.noarch-pyproject-modules -e datanommer.models.alembic.env
Check import: datanommer
Check import: datanommer.models
Check import: datanommer.models.alembic
Check import: datanommer.models.testing
+ 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  -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-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-annobin-cc1  -Wl,--build-id=sha1  '
+ PATH=/builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
+ PYTHONPATH=/builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib64/python3.11/site-packages:/builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages
+ PYTHONDONTWRITEBYTECODE=1
+ PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/datanommer.models-1.0.4/.pyproject-builddir'
+ PYTEST_XDIST_AUTO_NUM_WORKERS=8
+ /usr/bin/pytest -v
============================= test session starts ==============================
platform linux -- Python 3.11.2, pytest-7.2.2, pluggy-1.0.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /builddir/build/BUILD/datanommer.models-1.0.4
plugins: postgresql-3.1.3, mock-3.10.0
collecting ... collected 48 items
tests/test_jsonencodeddict.py::test_jsonencodeddict PASSED               [  2%]
tests/test_jsonencodeddict.py::test_jsonencodeddict_null PASSED          [  4%]
tests/test_jsonencodeddict.py::test_jsonencodeddict_compare PASSED       [  6%]
tests/test_jsonencodeddict.py::test_jsonencodeddict_compare_like PASSED  [  8%]
tests/test_model.py::test_init_uri_and_engine PASSED                     [ 10%]
tests/test_model.py::test_init_no_uri_and_no_engine PASSED               [ 12%]
tests/test_model.py::test_init_with_engine PASSED                        [ 14%]
tests/test_model.py::test_init_no_init_twice PASSED                      [ 16%]
tests/test_model.py::test_unclassified_category FAILED                   [ 18%]
tests/test_model.py::test_from_msg_id FAILED                             [ 20%]
tests/test_model.py::test_add_missing_msg_id FAILED                      [ 22%]
tests/test_model.py::test_add_missing_timestamp FAILED                   [ 25%]
tests/test_model.py::test_add_timestamp_with_Z FAILED                    [ 27%]
tests/test_model.py::test_add_timestamp_with_junk PASSED                 [ 29%]
tests/test_model.py::test_add_and_check_for_others FAILED                [ 31%]
tests/test_model.py::test_add_nothing PASSED                             [ 33%]
tests/test_model.py::test_add_and_check FAILED                           [ 35%]
tests/test_model.py::test_categories FAILED                              [ 37%]
tests/test_model.py::test_categories_with_umb FAILED                     [ 39%]
tests/test_model.py::test_grep_all FAILED                                [ 41%]
tests/test_model.py::test_grep_category FAILED                           [ 43%]
tests/test_model.py::test_grep_not_category FAILED                       [ 45%]
tests/test_model.py::test_add_headers FAILED                             [ 47%]
tests/test_model.py::test_grep_topics FAILED                             [ 50%]
tests/test_model.py::test_grep_not_topics FAILED                         [ 52%]
tests/test_model.py::test_grep_start_end_validation PASSED               [ 54%]
tests/test_model.py::test_grep_start_end FAILED                          [ 56%]
tests/test_model.py::test_grep_msg_id FAILED                             [ 58%]
tests/test_model.py::test_grep_users FAILED                              [ 60%]
tests/test_model.py::test_grep_not_users FAILED                          [ 62%]
tests/test_model.py::test_grep_packages FAILED                           [ 64%]
tests/test_model.py::test_grep_not_packages FAILED                       [ 66%]
tests/test_model.py::test_grep_contains FAILED                           [ 68%]
tests/test_model.py::test_grep_rows_per_page_none FAILED                 [ 70%]
tests/test_model.py::test_grep_rows_per_page_zero FAILED                 [ 72%]
tests/test_model.py::test_grep_defer FAILED                              [ 75%]
tests/test_model.py::test_add_duplicate FAILED                           [ 77%]
tests/test_model.py::test_add_integrity_error PASSED                     [ 79%]
tests/test_model.py::test_add_duplicate_package FAILED                   [ 81%]
tests/test_model.py::test_add_message_with_error_on_packages FAILED      [ 83%]
tests/test_model.py::test_as_fedora_message_dict FAILED                  [ 85%]
tests/test_model.py::test_as_fedora_message_dict_old_headers FAILED      [ 87%]
tests/test_model.py::test_as_fedora_message_dict_no_headers FAILED       [ 89%]
tests/test_model.py::test_as_dict FAILED                                 [ 91%]
tests/test_model.py::test_as_dict_with_users_and_packages FAILED         [ 93%]
tests/test_model.py::test___json__deprecated FAILED                      [ 95%]
tests/test_model.py::test_singleton_create PASSED                        [ 97%]
tests/test_model.py::test_singleton_get_existing PASSED                  [100%]
=================================== FAILURES ===================================
__________________________ test_unclassified_category __________________________
self = <sqlalchemy.engine.base.Connection object at 0x3feabbbfd0>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe9366a10>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8aace90>
parameters = [{'category': 'Unclassified', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:30:02+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8aace90>, 1]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8aace90>, [{'category': 'Unclassified', '..._severity': 20, 'sent-at': '2023-04-26T00:30:02+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3feabbbfd0>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe9365290>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe9366a10>
connection = <sqlalchemy.engine.base.Connection object at 0x3feabbbfd0>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe9365290>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8aace90>, 1]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8aace90>
parameters = [{'category': 'Unclassified', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:30:02+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8ff81d0>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8ff81d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8ff81d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8ff81d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8ff81d0>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8aafc10>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3feacea290>
    def test_unclassified_category(datanommer_models):
        example_message = generate_message(topic="too.short")
>       add(example_message)
tests/test_model.py:97: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8aafc10>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:30:02+00:00', 'fed ... (147 characters truncated) ... : 'Unclassified', 'i': 0, 'msg_id': 'dde98b09-13aa-4746-8a4e-2c7560bc8b45', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py", line 258, in get_category
    self.category = topic.split(".")[index]
                    ~~~~~~~~~~~~~~~~^^^^^^^
IndexError: list index out of range
_______________________________ test_from_msg_id _______________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe729aa90>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe729a150>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7298f90>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:30:23+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7298f90>, 2]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7298f90>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:30:23+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe729aa90>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe729ae50>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe729a150>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe729aa90>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe729ae50>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7298f90>, 2]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7298f90>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:30:23+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe729ba90>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe729ba90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe729ba90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe729ba90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe729ba90>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7924b10>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe7299a50>
    def test_from_msg_id(datanommer_models):
        example_message = generate_message()
        example_message.id = "ACUSTOMMESSAGEID"
>       add(example_message)
tests/test_model.py:106: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7924b10>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:30:23+00:00', 'fed ... (145 characters truncated) ... est.a.nice.message', 'category': 'a', 'i': 0, 'msg_id': 'ACUSTOMMESSAGEID', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
___________________________ test_add_missing_msg_id ____________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe82c2350>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe82c1890>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe726eb90>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:30:41+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe726eb90>, 3]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe726eb90>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:30:41+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe82c2350>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe82c04d0>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe82c1890>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe82c2350>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe82c04d0>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe726eb90>, 3]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe726eb90>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:30:41+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe726e8d0>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe726e8d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe726e8d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe726e8d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe726e8d0>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7512e10>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe82c0f90>
caplog = <_pytest.logging.LogCaptureFixture object at 0x3fe82c29d0>
    def test_add_missing_msg_id(datanommer_models, caplog):
        caplog.set_level(logging.INFO)
        example_message = generate_message()
        example_message._properties.message_id = None
>       add(example_message)
tests/test_model.py:116: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7512e10>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:30:41+00:00', 'fed ... (165 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': '497d92b5-9159-4aab-8a48-eaa604d19c9f', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
------------------------------ Captured log call -------------------------------
INFO     datanommer:__init__.py:269 Message on org.fedoraproject.test.a.nice.message was received without a msg_id
__________________________ test_add_missing_timestamp __________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe754a0d0>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe7549790>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe75488d0>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': None}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe75488d0>, 4]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe75488d0>, [{'category': 'a', 'certificate...age', 'fedora_messaging_severity': 20, 'sent-at': None}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe754a0d0>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe754a810>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe7549790>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe754a0d0>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe754a810>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe75488d0>, 4]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe75488d0>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': None}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe754ad90>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe754ad90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe754ad90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe754ad90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe754ad90>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe88408d0>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe7549350>
    def test_add_missing_timestamp(datanommer_models):
        example_message = generate_message()
        example_message._properties.headers["sent-at"] = None
    
>       add(example_message)
tests/test_model.py:129: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe88408d0>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': None, 'fedora_messaging_severity' ... (120 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': '0a869e00-7d19-4029-abba-a5c665c86c9e', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
__________________________ test_add_timestamp_with_Z ___________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe8d67e90>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8d67450>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe85ef450>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2021-07-27T04:22:42Z'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe85ef450>, 5]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe85ef450>, [{'category': 'a', 'certificate...aging_severity': 20, 'sent-at': '2021-07-27T04:22:42Z'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe8d67e90>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe8d66b10>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8d67450>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe8d67e90>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe8d66b10>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe85ef450>, 5]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe85ef450>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2021-07-27T04:22:42Z'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8d65e10>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8d65e10>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8d65e10>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8d65e10>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8d65e10>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7d547d0>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe8d65d50>
    def test_add_timestamp_with_Z(datanommer_models):
        example_message = generate_message()
        example_message._properties.headers["sent-at"] = "2021-07-27T04:22:42Z"
    
>       add(example_message)
tests/test_model.py:142: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7d547d0>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2021-07-27T04:22:42Z', 'fedora_m ... (160 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': '52ea125b-c8d5-4cca-b8f4-6f8b824d07fc', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
________________________ test_add_and_check_for_others _________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe859ed90>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe7f01cd0>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8a96590>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_rpm_abrt-addon-python3': Tru...g_rpm_kernel': True, 'fedora_messaging_schema': 'bodhi.update.comment.v1', 'fedora_messaging_severity': 20, ...}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8a96590>, 6]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8a96590>, [{'category': 'bodhi', 'certifi...date.comment.v1', 'fedora_messaging_severity': 20, ...}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe859ed90>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7b67210>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe7f01cd0>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe859ed90>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7b67210>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8a96590>, 6]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8a96590>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_rpm_abrt-addon-python3': Tru...g_rpm_kernel': True, 'fedora_messaging_schema': 'bodhi.update.comment.v1', 'fedora_messaging_severity': 20, ...}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8a96710>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8a96710>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8a96710>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8a96710>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8a96710>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8a95350>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe7f00090>
    def test_add_and_check_for_others(datanommer_models):
    
        # There are no users or packages at the start
        assert User.query.count() == 0
        assert Package.query.count() == 0
    
        # Then add a message
>       add(generate_bodhi_update_complete_message())
tests/test_model.py:168: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8a95350>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'comment': {'karma': -1, 'text': 'testing testing', 'timestamp': '2019-03-18 16:54:48', 'update': {'alias': 'FEDORA-EPEL-2021-f2d195dada', ' ... (680 characters truncated) ... tegory': 'bodhi', 'i': 0, 'msg_id': '266c11ae-703a-4e15-98f6-55285eede964', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
______________________________ test_add_and_check ______________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe7d6da10>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe78f0cd0>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe78f1690>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:32:01+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe78f1690>, 7]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe78f1690>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:32:01+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe7d6da10>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7b2bf90>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe78f0cd0>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe7d6da10>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7b2bf90>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe78f1690>, 7]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe78f1690>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:32:01+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe78f2a50>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe78f2a50>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe78f2a50>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe78f2a50>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe78f2a50>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe83a3c10>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe872a450>
    def test_add_and_check(datanommer_models):
>       add(generate_message())
tests/test_model.py:190: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe83a3c10>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:32:01+00:00', 'fed ... (164 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': '99783f03-e671-43fa-8729-f444292c55e6', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
_______________________________ test_categories ________________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe80afa10>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe80ae6d0>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8734ed0>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_rpm_abrt-addon-python3': Tru...g_rpm_kernel': True, 'fedora_messaging_schema': 'bodhi.update.comment.v1', 'fedora_messaging_severity': 20, ...}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8734ed0>, 8]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8734ed0>, [{'category': 'bodhi', 'certifi...date.comment.v1', 'fedora_messaging_severity': 20, ...}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe80afa10>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe923edd0>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe80ae6d0>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe80afa10>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe923edd0>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8734ed0>, 8]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8734ed0>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_rpm_abrt-addon-python3': Tru...g_rpm_kernel': True, 'fedora_messaging_schema': 'bodhi.update.comment.v1', 'fedora_messaging_severity': 20, ...}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8736750>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8736750>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8736750>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8736750>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8736750>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7ea1f50>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe80ade10>
    def test_categories(datanommer_models):
>       add(generate_bodhi_update_complete_message())
tests/test_model.py:196: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7ea1f50>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'comment': {'karma': -1, 'text': 'testing testing', 'timestamp': '2019-03-18 16:54:48', 'update': {'alias': 'FEDORA-EPEL-2021-f2d195dada', ' ... (680 characters truncated) ... tegory': 'bodhi', 'i': 0, 'msg_id': '91ac720c-fa1c-4691-b992-80883ce48d88', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
___________________________ test_categories_with_umb ___________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe8aca310>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8aca750>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8214ad0>
parameters = [{'category': 'brew', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:32:36+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8214ad0>, 9]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8214ad0>, [{'category': 'brew', 'certific..._severity': 20, 'sent-at': '2023-04-26T00:32:36+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe8aca310>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe8acb190>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8aca750>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe8aca310>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe8acb190>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8214ad0>, 9]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8214ad0>
parameters = [{'category': 'brew', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:32:36+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8216b50>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8216b50>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8216b50>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8216b50>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8216b50>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7e847d0>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe8aca950>
    def test_categories_with_umb(datanommer_models):
>       add(generate_message(topic="/topic/VirtualTopic.eng.brew.task.closed"))
tests/test_model.py:203: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7e847d0>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:32:36+00:00', 'fed ... (171 characters truncated) ... ategory': 'brew', 'i': 0, 'msg_id': 'c8847460-1d6e-4902-b70a-2b9b80e81c4f', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
________________________________ test_grep_all _________________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe82546d0>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8256f90>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8238210>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:32:53+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8238210>, 10]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8238210>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:32:53+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe82546d0>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe82540d0>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8256f90>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe82546d0>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe82540d0>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8238210>, 10]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8238210>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:32:53+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8238550>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8238550>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8238550>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8238550>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8238550>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7828210>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe82568d0>
    def test_grep_all(datanommer_models):
        example_message = generate_message()
>       add(example_message)
tests/test_model.py:211: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7828210>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:32:53+00:00', 'fed ... (165 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': '1b824300-3ab6-4920-b264-db42dc17beb7', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
______________________________ test_grep_category ______________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe87ab910>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe87ab490>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7bd8ad0>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:33:10+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7bd8ad0>, 11]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7bd8ad0>, [{'category': 'bodhi', 'certifi..._severity': 20, 'sent-at': '2023-04-26T00:33:10+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe87ab910>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe87a8c10>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe87ab490>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe87ab910>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe87a8c10>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7bd8ad0>, 11]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7bd8ad0>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:33:10+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7bd81d0>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7bd81d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7bd81d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7bd81d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7bd81d0>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8836f50>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe87a9d10>
    def test_grep_category(datanommer_models):
        example_message = generate_message(topic="org.fedoraproject.prod.bodhi.newupdate")
>       add(example_message)
tests/test_model.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8836f50>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:33:10+00:00', 'fed ... (170 characters truncated) ... tegory': 'bodhi', 'i': 0, 'msg_id': '90c6b584-4efb-4862-8c3d-3af5a832278e', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
____________________________ test_grep_not_category ____________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe8cf6250>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8cf4dd0>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8415210>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:33:28+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8415210>, 12]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8415210>, [{'category': 'bodhi', 'certifi..._severity': 20, 'sent-at': '2023-04-26T00:33:28+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe8cf6250>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe8cf6d50>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8cf4dd0>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe8cf6250>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe8cf6d50>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8415210>, 12]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8415210>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:33:28+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8415a10>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8415a10>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8415a10>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8415a10>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8415a10>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8415450>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe8cf5150>
    def test_grep_not_category(datanommer_models):
        example_message = generate_message(topic="org.fedoraproject.prod.bodhi.newupdate")
>       add(example_message)
tests/test_model.py:233: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8415450>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:33:28+00:00', 'fed ... (170 characters truncated) ... tegory': 'bodhi', 'i': 0, 'msg_id': '0f91b5bc-96e9-41ec-b3f1-1b3e7f44576c', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
_______________________________ test_add_headers _______________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe8386510>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8386c10>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe787b450>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'baz': 1, 'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'foo': 'bar', ...}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe787b450>, 13]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe787b450>, [{'category': 'bodhi', 'certifi...e', 'fedora_messaging_severity': 20, 'foo': 'bar', ...}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe8386510>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe8385d90>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8386c10>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe8386510>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe8385d90>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe787b450>, 13]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe787b450>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'baz': 1, 'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'foo': 'bar', ...}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7879410>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7879410>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7879410>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7879410>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7879410>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7d40250>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe8385a90>
    def test_add_headers(datanommer_models):
        example_headers = {"foo": "bar", "baz": 1, "wibble": ["zork", "zap"]}
        example_message = generate_message(
            topic="org.fedoraproject.prod.bodhi.newupdate", headers=example_headers
        )
>       add(example_message)
tests/test_model.py:246: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7d40250>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'foo': 'bar', 'baz': 1, 'wibble': ['zork', 'zap'], 'fedora_messaging_schema': 'base.mes ... (221 characters truncated) ... tegory': 'bodhi', 'i': 0, 'msg_id': '274b08e5-36fa-4f4f-8672-4f5ba25434bb', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
_______________________________ test_grep_topics _______________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe79f16d0>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe79f3150>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe88ee550>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:34:02+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe88ee550>, 14]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe88ee550>, [{'category': 'bodhi', 'certifi..._severity': 20, 'sent-at': '2023-04-26T00:34:02+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe79f16d0>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe79f3f50>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe79f3150>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe79f16d0>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe79f3f50>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe88ee550>, 14]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe88ee550>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:34:02+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe88ee990>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe88ee990>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe88ee990>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe88ee990>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe88ee990>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8464d10>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe79f03d0>
    def test_grep_topics(datanommer_models):
        example_message = generate_message(topic="org.fedoraproject.prod.bodhi.newupdate")
>       add(example_message)
tests/test_model.py:255: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8464d10>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:34:02+00:00', 'fed ... (169 characters truncated) ... tegory': 'bodhi', 'i': 0, 'msg_id': '7423e62c-8637-4191-9fcd-3e86ae18ee1f', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
_____________________________ test_grep_not_topics _____________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe88d96d0>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe88dbdd0>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe85fa490>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:34:20+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe85fa490>, 15]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe85fa490>, [{'category': 'bodhi', 'certifi..._severity': 20, 'sent-at': '2023-04-26T00:34:20+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe88d96d0>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe88db390>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe88dbdd0>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe88d96d0>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe88db390>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe85fa490>, 15]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe85fa490>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:34:20+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe85f9f90>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe85f9f90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe85f9f90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe85f9f90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe85f9f90>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe78f4c90>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe88db1d0>
    def test_grep_not_topics(datanommer_models):
        example_message = generate_message(topic="org.fedoraproject.prod.bodhi.newupdate")
>       add(example_message)
tests/test_model.py:266: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe78f4c90>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:34:20+00:00', 'fed ... (170 characters truncated) ... tegory': 'bodhi', 'i': 0, 'msg_id': 'd3d57b3f-e2a8-4046-aba8-fd5f0f3e33f3', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
_____________________________ test_grep_start_end ______________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe887cc90>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe887c450>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7c98f10>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2021-04-01T00:00:01'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7c98f10>, 16]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7c98f10>, [{'category': 'a', 'certificate...saging_severity': 20, 'sent-at': '2021-04-01T00:00:01'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe887cc90>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7c9a4d0>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe887c450>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe887cc90>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7c9a4d0>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7c98f10>, 16]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7c98f10>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2021-04-01T00:00:01'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7c98a90>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7c98a90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7c98a90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7c98a90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7c98a90>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe887ee50>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe73bfe10>
    def test_grep_start_end(datanommer_models):
        example_message = generate_message()
        example_message._properties.headers["sent-at"] = "2021-04-01T00:00:01"
>       add(example_message)
tests/test_model.py:290: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe887ee50>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2021-04-01T00:00:01', 'fedora_me ... (126 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': '07a09075-4e54-4bec-b451-a2fc115c328c', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
_______________________________ test_grep_msg_id _______________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe83d1a50>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe83d3ad0>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe83d0fd0>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:35:00+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe83d0fd0>, 17]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe83d0fd0>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:35:00+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe83d1a50>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe83d3050>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe83d3ad0>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe83d1a50>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe83d3050>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe83d0fd0>, 17]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe83d0fd0>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:35:00+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe83d0790>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe83d0790>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe83d0790>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe83d0790>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe83d0790>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8d65b90>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe83d17d0>
    def test_grep_msg_id(datanommer_models):
        example_message = generate_message()
>       add(example_message)
tests/test_model.py:312: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8d65b90>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:35:00+00:00', 'fed ... (161 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': 'c220750e-88da-4c72-a536-bf6392687d7f', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
_______________________________ test_grep_users ________________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe7cc16d0>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe7cc0210>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7337110>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:35:18+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7337110>, 18]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7337110>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:35:18+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe7cc16d0>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7cc2690>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe7cc0210>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe7cc16d0>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7cc2690>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7337110>, 18]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7337110>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:35:18+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe73350d0>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe73350d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe73350d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe73350d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe73350d0>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe73344d0>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe7cc1310>
    def test_grep_users(datanommer_models):
        example_message = generate_message()
>       add(example_message)
tests/test_model.py:338: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe73344d0>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:35:18+00:00', 'fed ... (165 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': '40e533c4-9e20-4b1f-bdbe-fe7e74cccfc2', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
_____________________________ test_grep_not_users ______________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe8387e50>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8387e90>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7a664d0>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:35:35+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7a664d0>, 19]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7a664d0>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:35:35+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe8387e50>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe9092b90>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8387e90>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe8387e50>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe9092b90>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7a664d0>, 19]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7a664d0>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:35:35+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7a64b50>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7a64b50>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7a64b50>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7a64b50>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7a64b50>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe83d0ed0>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe8ac5950>
    def test_grep_not_users(datanommer_models):
        example_message = generate_message()
>       add(example_message)
tests/test_model.py:356: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe83d0ed0>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:35:35+00:00', 'fed ... (165 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': '620b6f6e-a92d-4df7-ae38-003435991e9b', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
______________________________ test_grep_packages ______________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe74b9a90>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe74b8890>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7c99650>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:35:53+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7c99650>, 20]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7c99650>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:35:53+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe74b9a90>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe74b9790>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe74b8890>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe74b9a90>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe74b9790>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7c99650>, 20]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7c99650>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:35:53+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7c9b390>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7c9b390>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7c9b390>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7c9b390>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7c9b390>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe93c1250>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe74b8150>
    def test_grep_packages(datanommer_models):
        example_message = generate_message()
>       add(example_message)
tests/test_model.py:374: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe93c1250>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:35:53+00:00', 'fed ... (165 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': '71346f9c-dbab-4133-8276-4b519c61b903', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
____________________________ test_grep_not_packages ____________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe7926ed0>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe7924b10>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7f00490>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:36:11+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7f00490>, 21]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7f00490>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:36:11+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe7926ed0>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7925110>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe7924b10>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe7926ed0>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7925110>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7f00490>, 21]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7f00490>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:36:11+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7f00950>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7f00950>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7f00950>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7f00950>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7f00950>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe785fa90>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe7924c50>
    def test_grep_not_packages(datanommer_models):
        example_message = generate_message()
>       add(example_message)
tests/test_model.py:392: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe785fa90>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:36:11+00:00', 'fed ... (165 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': '3955895c-5ebe-4f64-9063-8bb38152c4e6', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
______________________________ test_grep_contains ______________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe93c16d0>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe93c3c90>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe81fb750>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:36:29+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe81fb750>, 22]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe81fb750>, [{'category': 'bodhi', 'certifi..._severity': 20, 'sent-at': '2023-04-26T00:36:29+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe93c16d0>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe9477450>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe93c3c90>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe93c16d0>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe9477450>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe81fb750>, 22]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe81fb750>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:36:29+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe81fbe90>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe81fbe90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe81fbe90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe81fbe90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe81fbe90>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7c9b1d0>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe93c04d0>
    def test_grep_contains(datanommer_models):
        example_message = generate_message(topic="org.fedoraproject.prod.bodhi.newupdate")
>       add(example_message)
tests/test_model.py:410: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7c9b1d0>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:36:29+00:00', 'fed ... (170 characters truncated) ... tegory': 'bodhi', 'i': 0, 'msg_id': 'cca7a706-dd03-48b7-917d-158ee5c7f97b', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
_________________________ test_grep_rows_per_page_none _________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe7ec7e90>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe7ec6e10>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7df0f10>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:36:46+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7df0f10>, 23]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7df0f10>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:36:46+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe7ec7e90>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7ec7bd0>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe7ec6e10>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe7ec7e90>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7ec7bd0>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7df0f10>, 23]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7df0f10>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:36:46+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7df02d0>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7df02d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7df02d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7df02d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7df02d0>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8acd750>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe7ec6110>
    def test_grep_rows_per_page_none(datanommer_models):
        for x in range(0, 200):
            example_message = generate_message()
            example_message.id = f"{x}"
>           add(example_message)
tests/test_model.py:423: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8acd750>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:36:46+00:00', 'fed ... (130 characters truncated) ... fedoraproject.test.a.nice.message', 'category': 'a', 'i': 0, 'msg_id': '0', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
_________________________ test_grep_rows_per_page_zero _________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe79ab250>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe79a9f10>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe79a8f10>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:37:04+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe79a8f10>, 24]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe79a8f10>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:37:04+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe79ab250>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe93c1710>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe79a9f10>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe79ab250>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe93c1710>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe79a8f10>, 24]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe79a8f10>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:37:04+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe79a8650>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe79a8650>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe79a8650>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe79a8650>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe79a8650>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8cabdd0>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe79aa4d0>
    def test_grep_rows_per_page_zero(datanommer_models):
        for x in range(0, 200):
            example_message = generate_message()
            example_message.id = f"{x}"
>           add(example_message)
tests/test_model.py:442: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8cabdd0>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:37:04+00:00', 'fed ... (129 characters truncated) ... fedoraproject.test.a.nice.message', 'category': 'a', 'i': 0, 'msg_id': '0', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
_______________________________ test_grep_defer ________________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe741b950>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe741af10>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8818050>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:37:22+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8818050>, 25]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8818050>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:37:22+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe741b950>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe741bfd0>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe741af10>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe741b950>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe741bfd0>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8818050>, 25]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8818050>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:37:22+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe881be10>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe881be10>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe881be10>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe881be10>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe881be10>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe881b350>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe741a350>
    def test_grep_defer(datanommer_models):
        example_message = generate_message()
>       add(example_message)
tests/test_model.py:456: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe881b350>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:37:22+00:00', 'fed ... (165 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': '0c7ec2f1-b394-4dba-a3eb-a00bb3326ffc', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
______________________________ test_add_duplicate ______________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe8d896d0>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8d8af10>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7444e50>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:37:41+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7444e50>, 26]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7444e50>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:37:41+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe8d896d0>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe8d8b390>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8d8af10>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe8d896d0>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe8d8b390>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7444e50>, 26]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7444e50>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:37:41+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7445790>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7445790>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7445790>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7445790>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7445790>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8764d10>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe8d8b310>
caplog = <_pytest.logging.LogCaptureFixture object at 0x3fe8d8b990>
    def test_add_duplicate(datanommer_models, caplog):
        example_message = generate_message()
>       add(example_message)
tests/test_model.py:468: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8764d10>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:37:41+00:00', 'fed ... (165 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': '1daa91b5-6f22-4cda-bdf3-5d05d04e50ae', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
__________________________ test_add_duplicate_package __________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe8215390>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8217910>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8761fd0>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_rpm_pkg': True, 'fedora_messaging_schema': 'MessageWithPackages', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:38:06+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8761fd0>, 27]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8761fd0>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:38:06+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe8215390>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe8227fd0>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8217910>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe8215390>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe8227fd0>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8761fd0>, 27]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8761fd0>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_rpm_pkg': True, 'fedora_messaging_schema': 'MessageWithPackages', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:38:06+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8760910>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8760910>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8760910>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8760910>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8760910>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe85b3490>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe8224390>
    def test_add_duplicate_package(datanommer_models):
        # Define a special message schema and register it
        class MessageWithPackages(fedora_message.Message):
            @property
            def packages(self):
                return ["pkg", "pkg"]
    
        fedora_message._schema_name_to_class["MessageWithPackages"] = MessageWithPackages
        fedora_message._class_to_schema_name[MessageWithPackages] = "MessageWithPackages"
        example_message = MessageWithPackages(
            topic="org.fedoraproject.test.a.nice.message",
            body={"encouragement": "You're doing great!"},
            headers=None,
        )
        try:
>           add(example_message)
tests/test_model.py:503: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe85b3490>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'MessageWithPackages', 'sent-at': '2023-04-26T00:38:06+00:00 ... (205 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': 'c9f7c327-7603-43e0-b4ac-af8ade2dc2d8', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
___________________ test_add_message_with_error_on_packages ____________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe8877d90>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8877310>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8a14c50>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'CustomMessage', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:38:25+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8a14c50>, 28]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8a14c50>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:38:25+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe8877d90>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe88748d0>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8877310>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe8877d90>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe88748d0>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8a14c50>, 28]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8a14c50>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'CustomMessage', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:38:25+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8a14a90>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8a14a90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8a14a90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8a14a90>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe8a14a90>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7836b50>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe88768d0>
caplog = <_pytest.logging.LogCaptureFixture object at 0x3fe88743d0>
    def test_add_message_with_error_on_packages(datanommer_models, caplog):
        # Define a special message schema and register it
        class CustomMessage(fedora_message.Message):
            @property
            def packages(self):
                raise KeyError
    
            def _filter_headers(self):
                return {}
    
        fedora_message._schema_name_to_class["CustomMessage"] = CustomMessage
        fedora_message._class_to_schema_name[CustomMessage] = "CustomMessage"
        example_message = CustomMessage(
            topic="org.fedoraproject.test.a.nice.message",
            body={"encouragement": "You're doing great!"},
            headers=None,
        )
        try:
>           add(example_message)
tests/test_model.py:530: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7836b50>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'CustomMessage', 'sent-at': '2023-04-26T00:38:25+00:00', 'fe ... (166 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': '439c0a58-ef9a-4efd-a00f-f9d2b3611c40', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
------------------------------ Captured log call -------------------------------
ERROR    datanommer:__init__.py:140 Could not get the list of packages from a message on org.fedoraproject.test.a.nice.message with id 439c0a58-ef9a-4efd-a00f-f9d2b3611c40
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py", line 138, in add
    packages = message.packages
               ^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/datanommer.models-1.0.4/tests/test_model.py", line 517, in packages
    raise KeyError
KeyError
_________________________ test_as_fedora_message_dict __________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe7443750>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe74432d0>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe83ac6d0>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:38:42+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe83ac6d0>, 29]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe83ac6d0>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:38:42+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe7443750>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7443390>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe74432d0>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe7443750>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7443390>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe83ac6d0>, 29]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe83ac6d0>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:38:42+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe83ac350>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe83ac350>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe83ac350>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe83ac350>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe83ac350>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe83add10>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe7442dd0>
    def test_as_fedora_message_dict(datanommer_models):
        example_message = generate_message()
>       add(example_message)
tests/test_model.py:542: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe83add10>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:38:42+00:00', 'fed ... (165 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': 'b5f14841-8bff-4167-b48f-bc0ce1c11bda', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
___________________ test_as_fedora_message_dict_old_headers ____________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe7586710>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe7585c90>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe74ff190>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:39:00+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe74ff190>, 30]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe74ff190>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:39:00+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe7586710>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7586e50>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe7585c90>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe7586710>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7586e50>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe74ff190>, 30]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe74ff190>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:39:00+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe74fc6d0>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe74fc6d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe74fc6d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe74fc6d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe74fc6d0>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7e6c990>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe7585210>
    def test_as_fedora_message_dict_old_headers(datanommer_models):
        # Messages received with fedmsg don't have the sent-at header
        example_message = generate_message()
>       add(example_message)
tests/test_model.py:555: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7e6c990>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:39:00+00:00', 'fed ... (161 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': '3bd167b0-b028-4f65-9ed8-1d302e39989a', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
____________________ test_as_fedora_message_dict_no_headers ____________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe7c16250>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe7c15850>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7b51050>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:39:18+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7b51050>, 31]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7b51050>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:39:18+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe7c16250>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7c16990>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe7c15850>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe7c16250>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7c16990>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7b51050>, 31]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe7b51050>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:39:18+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7b50710>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7b50710>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7b50710>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7b50710>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7b50710>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8aca010>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe7c14d90>
    def test_as_fedora_message_dict_no_headers(datanommer_models):
        # Messages can have no headers
        example_message = generate_message()
>       add(example_message)
tests/test_model.py:571: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe8aca010>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:39:18+00:00', 'fed ... (165 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': '49cfa087-1367-4386-a32b-e8bf048c0e52', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
_________________________________ test_as_dict _________________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe7584a50>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe7586010>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8216b10>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:39:38+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8216b10>, 32]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8216b10>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:39:38+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe7584a50>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7585e10>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe7586010>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe7584a50>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe7585e10>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8216b10>, 32]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe8216b10>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:39:38+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe82151d0>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe82151d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe82151d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe82151d0>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe82151d0>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe91f6510>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe7584c50>
    def test_as_dict(datanommer_models):
>       add(generate_message())
tests/test_model.py:588: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe91f6510>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:39:38+00:00', 'fed ... (165 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': '8e06bb98-dc7e-4fda-9640-ef8faf6187a7', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
_____________________ test_as_dict_with_users_and_packages _____________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe89b0c50>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe89b3090>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe73240d0>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_rpm_abrt-addon-python3': Tru...g_rpm_kernel': True, 'fedora_messaging_schema': 'bodhi.update.comment.v1', 'fedora_messaging_severity': 20, ...}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe73240d0>, 33]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe73240d0>, [{'category': 'bodhi', 'certifi...date.comment.v1', 'fedora_messaging_severity': 20, ...}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe89b0c50>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe89b3390>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe89b3090>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe89b0c50>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe89b3390>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe73240d0>, 33]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe73240d0>
parameters = [{'category': 'bodhi', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_rpm_abrt-addon-python3': Tru...g_rpm_kernel': True, 'fedora_messaging_schema': 'bodhi.update.comment.v1', 'fedora_messaging_severity': 20, ...}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7324190>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7324190>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7324190>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7324190>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe7324190>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7b532d0>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe89b2fd0>
    def test_as_dict_with_users_and_packages(datanommer_models):
>       add(generate_bodhi_update_complete_message())
tests/test_model.py:599: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7b532d0>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'comment': {'karma': -1, 'text': 'testing testing', 'timestamp': '2019-03-18 16:54:48', 'update': {'alias': 'FEDORA-EPEL-2021-f2d195dada', ' ... (680 characters truncated) ... tegory': 'bodhi', 'i': 0, 'msg_id': 'f98844bb-95ae-4298-95ba-720032c7a9b0', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
___________________________ test___json__deprecated ____________________________
self = <sqlalchemy.engine.base.Connection object at 0x3fe8764610>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8767ad0>
constructor = <bound method DefaultExecutionContext._init_compiled of <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>>
statement = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe9367050>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:40:14+00:00'}, ...}]
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe9367050>, 1]}})
args = (<sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe9367050>, [{'category': 'a', 'certificate..._severity': 20, 'sent-at': '2023-04-26T00:40:14+00:00'}, ...}], <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>, [])
kw = {'cache_hit': symbol('CACHE_MISS')}
branched = <sqlalchemy.engine.base.Connection object at 0x3fe8764610>, yp = None
conn = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe8766d90>
    def _execute_context(
        self,
        dialect,
        constructor,
        statement,
        parameters,
        execution_options,
        *args,
        **kw
    ):
        """Create an :class:`.ExecutionContext` and execute, returning
        a :class:`_engine.CursorResult`."""
    
        branched = self
        if self.__branch_from:
            # if this is a "branched" connection, do everything in terms
            # of the "root" connection, *except* for .close(), which is
            # the only feature that branching provides
            self = self.__branch_from
    
        if execution_options:
            yp = execution_options.get("yield_per", None)
            if yp:
                execution_options = execution_options.union(
                    {"stream_results": True, "max_row_buffer": yp}
                )
    
        try:
            conn = self._dbapi_connection
            if conn is None:
                conn = self._revalidate_connection()
    
>           context = constructor(
                dialect, self, conn, execution_options, *args, **kw
            )
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cls = <class 'sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2'>
dialect = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x3fe8767ad0>
connection = <sqlalchemy.engine.base.Connection object at 0x3fe8764610>
dbapi_connection = <sqlalchemy.pool.base._ConnectionFairy object at 0x3fe8766d90>
execution_options = immutabledict({'autocommit': True, 'compiled_cache': {(<sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 obj...'username'), False, False), <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe9367050>, 1]}})
compiled = <sqlalchemy.dialects.postgresql.psycopg2.PGCompiler_psycopg2 object at 0x3fe9367050>
parameters = [{'category': 'a', 'certificate': None, 'crypto': None, 'headers': {'fedora_messaging_schema': 'base.message', 'fedora_messaging_severity': 20, 'sent-at': '2023-04-26T00:40:14+00:00'}, ...}]
invoked_statement = <sqlalchemy.sql.dml.Insert object at 0x3fe8d8cf90>
extracted_parameters = [], cache_hit = symbol('CACHE_MISS')
    @classmethod
    def _init_compiled(
        cls,
        dialect,
        connection,
        dbapi_connection,
        execution_options,
        compiled,
        parameters,
        invoked_statement,
        extracted_parameters,
        cache_hit=CACHING_DISABLED,
    ):
        """Initialize execution context for a Compiled construct."""
    
        self = cls.__new__(cls)
        self.root_connection = connection
        self._dbapi_connection = dbapi_connection
        self.dialect = connection.dialect
        self.extracted_parameters = extracted_parameters
        self.invoked_statement = invoked_statement
        self.compiled = compiled
        self.cache_hit = cache_hit
    
        self.execution_options = execution_options
    
        self._is_future_result = (
            connection._is_future
            or self.execution_options.get("future_result", False)
        )
    
        self.result_column_struct = (
            compiled._result_columns,
            compiled._ordered_columns,
            compiled._textual_ordered_columns,
            compiled._ad_hoc_textual,
            compiled._loose_column_name_matching,
        )
        self.isinsert = compiled.isinsert
        self.isupdate = compiled.isupdate
        self.isdelete = compiled.isdelete
        self.is_text = compiled.isplaintext
    
        if self.isinsert or self.isupdate or self.isdelete:
            self.is_crud = True
            self._is_explicit_returning = bool(compiled.statement._returning)
            self._is_implicit_returning = bool(
                compiled.returning and not compiled.statement._returning
            )
    
        if not parameters:
            self.compiled_parameters = [
                compiled.construct_params(
                    extracted_parameters=extracted_parameters,
                    escape_names=False,
                )
            ]
        else:
            self.compiled_parameters = [
                compiled.construct_params(
                    m,
                    escape_names=False,
                    _group_number=grp,
                    extracted_parameters=extracted_parameters,
                )
                for grp, m in enumerate(parameters)
            ]
    
            self.executemany = len(parameters) > 1
    
        # this must occur before create_cursor() since the statement
        # has to be regexed in some cases for server side cursor
        if util.py2k:
            self.unicode_statement = util.text_type(compiled.string)
        else:
            self.unicode_statement = compiled.string
    
        self.cursor = self.create_cursor()
    
        if self.compiled.insert_prefetch or self.compiled.update_prefetch:
            if self.executemany:
                self._process_executemany_defaults()
            else:
>               self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe9365990>
    def _process_executesingle_defaults(self):
        key_getter = self.compiled._within_exec_param_key_getter
        self.current_parameters = (
            compiled_parameters
        ) = self.compiled_parameters[0]
    
        for c in self.compiled.insert_prefetch:
            if c.default and not c.default.is_sequence and c.default.is_scalar:
                val = c.default.arg
            else:
>               val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe9365990>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.primary_key and column is column.table._autoincrement_column:
            if column.server_default and column.server_default.has_argument:
    
                # pre-execute passive defaults on primary key columns
                return self._execute_scalar(
                    "select %s" % column.server_default.arg, column.type
                )
    
            elif column.default is None or (
                column.default.is_sequence and column.default.optional
            ):
                # execute the sequence associated with a SERIAL primary
                # key column. for non-primary-key SERIAL, the ID just
                # generates server side.
    
                try:
                    seq_name = column._postgresql_seq_name
                except AttributeError:
                    tab = column.table.name
                    col = column.name
                    tab = tab[0 : 29 + max(0, (29 - len(col)))]
                    col = col[0 : 29 + max(0, (29 - len(tab)))]
                    name = "%s_%s_seq" % (tab, col)
                    column._postgresql_seq_name = seq_name = name
    
                if column.table is not None:
                    effective_schema = self.connection.schema_for_object(
                        column.table
                    )
                else:
                    effective_schema = None
    
                if effective_schema is not None:
                    exc = 'select nextval(\'"%s"."%s"\')' % (
                        effective_schema,
                        seq_name,
                    )
                else:
                    exc = "select nextval('\"%s\"')" % (seq_name,)
    
                return self._execute_scalar(exc, column.type)
    
>       return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe9365990>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
    def get_insert_default(self, column):
        if column.default is None:
            return None
        else:
>           return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe9365990>
column = Column('source_version', Unicode(), table=<messages>, default=ColumnDefault(<function source_version_default at 0x3fe95dcf40>))
default = ColumnDefault(<function source_version_default at 0x3fe95dcf40>)
type_ = Unicode()
    def _exec_default(self, column, default, type_):
        if default.is_sequence:
            return self.fire_sequence(default, type_)
        elif default.is_callable:
            self.current_column = column
>           return default.arg(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x3fe9365990>
    def source_version_default(context):
>       dist = pkg_resources.get_distribution("datanommer.models")
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
dist = Requirement.parse('datanommer.models')
    def get_distribution(dist):
        """Return a current distribution object for a Requirement or string"""
        if isinstance(dist, str):
            dist = Requirement.parse(dist)
        if isinstance(dist, Requirement):
>           dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
moduleOrReq = Requirement.parse('datanommer.models')
    def get_provider(moduleOrReq):
        """Return an IResourceProvider for the named module or requirement"""
        if isinstance(moduleOrReq, Requirement):
>           return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>
requirements = ('datanommer.models',)
    def require(self, *requirements):
        """Ensure that distributions matching `requirements` are activated
    
        `requirements` must be a string or a (possibly-nested) sequence
        thereof, specifying the distributions and versions required.  The
        return value is a sequence of the distributions that needed to be
        activated to fulfill the requirements; all relevant distributions are
        included, even if they were already activated in this working set.
        """
>       needed = self.resolve(parse_requirements(requirements))
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7f6e210>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       pkg_resources.DistributionNotFound: The 'datanommer.models' distribution was not found and is required by the application
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: DistributionNotFound
The above exception was the direct cause of the following exception:
datanommer_models = <sqlalchemy.orm.scoping.scoped_session object at 0x3fe8764390>
caplog = <_pytest.logging.LogCaptureFixture object at 0x3fe8767910>
mocker = <pytest_mock.plugin.MockerFixture object at 0x3fe8767b50>
    def test___json__deprecated(datanommer_models, caplog, mocker):
        mock_as_dict = mocker.patch("datanommer.models.Message.as_dict")
    
>       add(generate_message())
tests/test_model.py:610: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:147: in add
    Message.create(
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:275: in create
    session.flush()
<string>:2: in flush
    ???
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3444: in flush
    self._flush(objects)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3583: in _flush
    with util.safe_reraise():
/usr/lib64/python3.11/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__
    compat.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/session.py:3544: in _flush
    flush_context.execute()
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:456: in execute
    rec.execute(self)
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/unitofwork.py:630: in execute
    util.preloaded.orm_persistence.save_obj(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:245: in save_obj
    _emit_insert_statements(
/usr/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py:1238: in _emit_insert_statements
    result = connection._execute_20(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1705: in _execute_20
    return meth(self, args_10style, kwargs_10style, execution_options)
/usr/lib64/python3.11/site-packages/sqlalchemy/sql/elements.py:334: in _execute_on_connection
    return connection._execute_clauseelement(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1572: in _execute_clauseelement
    ret = self._execute_context(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1806: in _execute_context
    self._handle_dbapi_exception(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:2124: in _handle_dbapi_exception
    util.raise_(
/usr/lib64/python3.11/site-packages/sqlalchemy/util/compat.py:211: in raise_
    raise exception
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/base.py:1800: in _execute_context
    context = constructor(
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1026: in _init_compiled
    self._process_executesingle_defaults()
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1928: in _process_executesingle_defaults
    val = self.get_insert_default(c)
/usr/lib64/python3.11/site-packages/sqlalchemy/dialects/postgresql/base.py:3297: in get_insert_default
    return super(PGExecutionContext, self).get_insert_default(column)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1872: in get_insert_default
    return self._exec_default(column, column.default, column.type)
/usr/lib64/python3.11/site-packages/sqlalchemy/engine/default.py:1736: in _exec_default
    return default.arg(self)
../../BUILDROOT/python-datanommer-models-1.0.4-5.fc38.noarch/usr/lib/python3.11/site-packages/datanommer/models/__init__.py:162: in source_version_default
    dist = pkg_resources.get_distribution("datanommer.models")
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:478: in get_distribution
    dist = get_provider(dist)
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:354: in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:909: in require
    needed = self.resolve(parse_requirements(requirements))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pkg_resources.WorkingSet object at 0x3feaacbb50>, requirements = []
env = <pkg_resources.Environment object at 0x3fe7f6e210>, installer = None
replace_conflicting = False, extras = None
    def resolve(self, requirements, env=None, installer=None,  # noqa: C901
                replace_conflicting=False, extras=None):
        """List all distributions needed to (recursively) meet `requirements`
    
        `requirements` must be a sequence of ``Requirement`` objects.  `env`,
        if supplied, should be an ``Environment`` instance.  If
        not supplied, it defaults to all distributions available within any
        entry or distribution in the working set.  `installer`, if supplied,
        will be invoked with each requirement that cannot be met by an
        already-installed distribution; it should return a ``Distribution`` or
        ``None``.
    
        Unless `replace_conflicting=True`, raises a VersionConflict exception
        if
        any requirements are found on the path that have the correct name but
        the wrong version.  Otherwise, if an `installer` is supplied it will be
        invoked to obtain the correct version of the requirement and activate
        it.
    
        `extras` is a list of the extras to be used with these requirements.
        This is important because extra requirements may look like `my_req;
        extra = "my_extra"`, which would otherwise be interpreted as a purely
        optional requirement.  Instead, we want to be able to assert that these
        requirements are truly required.
        """
    
        # set up the stack
        requirements = list(requirements)[::-1]
        # set of processed requirements
        processed = {}
        # key -> dist
        best = {}
        to_activate = []
    
        req_extras = _ReqExtras()
    
        # Mapping of requirement to set of distributions that required it;
        # useful for reporting info about conflicts.
        required_by = collections.defaultdict(set)
    
        while requirements:
            # process dependencies breadth-first
            req = requirements.pop(0)
            if req in processed:
                # Ignore cyclic or redundant dependencies
                continue
    
            if not req_extras.markers_pass(req, extras):
                continue
    
            dist = best.get(req.key)
            if dist is None:
                # Find the best distribution and add it to the map
                dist = self.by_key.get(req.key)
                if dist is None or (dist not in req and replace_conflicting):
                    ws = self
                    if env is None:
                        if dist is None:
                            env = Environment(self.entries)
                        else:
                            # Use an empty environment and workingset to avoid
                            # any further conflicts with the conflicting
                            # distribution
                            env = Environment([])
                            ws = WorkingSet([])
                    dist = best[req.key] = env.best_match(
                        req, ws, installer,
                        replace_conflicting=replace_conflicting
                    )
                    if dist is None:
                        requirers = required_by.get(req, None)
>                       raise DistributionNotFound(req, requirers)
E                       sqlalchemy.exc.StatementError: (pkg_resources.DistributionNotFound) The 'datanommer.models' distribution was not found and is required by the application
E                       [SQL: INSERT INTO messages (msg_id, i, topic, timestamp, certificate, signature, category, username, crypto, source_name, source_version, msg, headers) VALUES (%(msg_id)s, %(i)s, %(topic)s, %(timestamp)s, %(certificate)s, %(signature)s, %(category)s, %(username)s, %(crypto)s, %(source_name)s, %(source_version)s, %(msg)s, %(headers)s) RETURNING messages.id]
E                       [parameters: [{'msg': {'encouragement': "You're doing great!"}, 'headers': {'fedora_messaging_schema': 'base.message', 'sent-at': '2023-04-26T00:40:14+00:00', 'fed ... (165 characters truncated) ...  'category': 'a', 'i': 0, 'msg_id': 'b3e55ca1-b3d7-4691-990e-0e80768ae1b4', 'certificate': None, 'username': None, 'signature': None, 'crypto': None}]]
/usr/lib/python3.11/site-packages/pkg_resources/__init__.py:795: StatementError
=============================== warnings summary ===============================
tests/test_jsonencodeddict.py::test_jsonencodeddict
  /builddir/build/BUILD/datanommer.models-1.0.4/tests/test_jsonencodeddict.py:24: RemovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings.  Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
    metadata.create_all(connection)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_model.py::test_unclassified_category - sqlalchemy.exc.State...
FAILED tests/test_model.py::test_from_msg_id - sqlalchemy.exc.StatementError:...
FAILED tests/test_model.py::test_add_missing_msg_id - sqlalchemy.exc.Statemen...
FAILED tests/test_model.py::test_add_missing_timestamp - sqlalchemy.exc.State...
FAILED tests/test_model.py::test_add_timestamp_with_Z - sqlalchemy.exc.Statem...
FAILED tests/test_model.py::test_add_and_check_for_others - sqlalchemy.exc.St...
FAILED tests/test_model.py::test_add_and_check - sqlalchemy.exc.StatementErro...
FAILED tests/test_model.py::test_categories - sqlalchemy.exc.StatementError: ...
FAILED tests/test_model.py::test_categories_with_umb - sqlalchemy.exc.Stateme...
FAILED tests/test_model.py::test_grep_all - sqlalchemy.exc.StatementError: (p...
FAILED tests/test_model.py::test_grep_category - sqlalchemy.exc.StatementErro...
FAILED tests/test_model.py::test_grep_not_category - sqlalchemy.exc.Statement...
FAILED tests/test_model.py::test_add_headers - sqlalchemy.exc.StatementError:...
FAILED tests/test_model.py::test_grep_topics - sqlalchemy.exc.StatementError:...
FAILED tests/test_model.py::test_grep_not_topics - sqlalchemy.exc.StatementEr...
FAILED tests/test_model.py::test_grep_start_end - sqlalchemy.exc.StatementErr...
FAILED tests/test_model.py::test_grep_msg_id - sqlalchemy.exc.StatementError:...
FAILED tests/test_model.py::test_grep_users - sqlalchemy.exc.StatementError: ...
FAILED tests/test_model.py::test_grep_not_users - sqlalchemy.exc.StatementErr...
FAILED tests/test_model.py::test_grep_packages - sqlalchemy.exc.StatementErro...
FAILED tests/test_model.py::test_grep_not_packages - sqlalchemy.exc.Statement...
FAILED tests/test_model.py::test_grep_contains - sqlalchemy.exc.StatementErro...
FAILED tests/test_model.py::test_grep_rows_per_page_none - sqlalchemy.exc.Sta...
FAILED tests/test_model.py::test_grep_rows_per_page_zero - sqlalchemy.exc.Sta...
FAILED tests/test_model.py::test_grep_defer - sqlalchemy.exc.StatementError: ...
FAILED tests/test_model.py::test_add_duplicate - sqlalchemy.exc.StatementErro...
FAILED tests/test_model.py::test_add_duplicate_package - sqlalchemy.exc.State...
FAILED tests/test_model.py::test_add_message_with_error_on_packages - sqlalch...
FAILED tests/test_model.py::test_as_fedora_message_dict - sqlalchemy.exc.Stat...
FAILED tests/test_model.py::test_as_fedora_message_dict_old_headers - sqlalch...
FAILED tests/test_model.py::test_as_fedora_message_dict_no_headers - sqlalche...
FAILED tests/test_model.py::test_as_dict - sqlalchemy.exc.StatementError: (pk...
FAILED tests/test_model.py::test_as_dict_with_users_and_packages - sqlalchemy...
FAILED tests/test_model.py::test___json__deprecated - sqlalchemy.exc.Statemen...
============= 34 failed, 14 passed, 1 warning in 720.11s (0:12:00) =============
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.ca4qZO (%check)
    Bad exit status from /var/tmp/rpm-tmp.ca4qZO (%check)
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.10/site-packages/mockbuild/util.py", line 598, in do_with_status
    raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode)
mockbuild.exception.Error: Command failed: 
 # bash --login -c /usr/bin/rpmbuild -ba --noprep --target noarch --nodeps /builddir/build/SPECS/python-datanommer-models.spec