Mock Version: 5.5 Mock Version: 5.5 Mock Version: 5.5 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/python-sqlalchemy-utils.spec'], chrootPath='/var/lib/mock/f41-build-106409-6179/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=997gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.b2dabr7t:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueprintOutput=False) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.b2dabr7t:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '00ecfe68ed9a4b8d9165a512f281c9f0', '-D', '/var/lib/mock/f41-build-106409-6179/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.b2dabr7t:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/python-sqlalchemy-utils.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1711324800 Wrote: /builddir/build/SRPMS/python-sqlalchemy-utils-0.41.1-5.fc41.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-sqlalchemy-utils.spec'], chrootPath='/var/lib/mock/f41-build-106409-6179/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=997gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.b2dabr7t:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueraiseExc=FalseprintOutput=False) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.b2dabr7t:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '52f05b9678e94db5904c359d1a7a4647', '-D', '/var/lib/mock/f41-build-106409-6179/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.b2dabr7t:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-sqlalchemy-utils.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1711324800 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.oEKf2A + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf SQLAlchemy-Utils-0.41.1 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/SQLAlchemy-Utils-0.41.1.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd SQLAlchemy-Utils-0.41.1 + rm -rf /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1-SPECPARTS + /usr/bin/mkdir -p /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1-SPECPARTS + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/no-psycopg2cffi.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/python-sqlalchemy-utils-0.41.1-no-pyodbc-dep.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/python-sqlalchemy-utils-0.41.1-nosqla2.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f + rm -rf SQLAlchemy-Utils.egg-info + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.ML0AWD + umask 022 + cd /builddir/build/BUILD + cd SQLAlchemy-Utils-0.41.1 + CFLAGS='-O2 -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 -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -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 -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -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 ']' + '[' -f setup.py ']' + echo 'python3dist(setuptools) >= 40.8' + echo 'python3dist(wheel)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -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 -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py312 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/python-sqlalchemy-utils-0.41.1-5.fc41.noarch-pyproject-buildrequires -x test Handling setuptools >= 40.8 from default build backend Requirement not satisfied: setuptools >= 40.8 Handling wheel from default build backend Requirement not satisfied: wheel Exiting dependency generation pass: build backend + cat /builddir/build/BUILD/python-sqlalchemy-utils-0.41.1-5.fc41.noarch-pyproject-buildrequires + rm -rfv '*.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-sqlalchemy-utils-0.41.1-5.fc41.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-sqlalchemy-utils.spec'], chrootPath='/var/lib/mock/f41-build-106409-6179/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=997gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.b2dabr7t:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueraiseExc=FalseprintOutput=False) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.b2dabr7t:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '52a15185e74240b3a1ed3de2239b98a5', '-D', '/var/lib/mock/f41-build-106409-6179/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.b2dabr7t:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -br --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-sqlalchemy-utils.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1711324800 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.kTxWnm + umask 022 + cd /builddir/build/BUILD + cd SQLAlchemy-Utils-0.41.1 + CFLAGS='-O2 -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 -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -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 -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -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 ']' + '[' -f setup.py ']' + echo 'python3dist(setuptools) >= 40.8' + echo 'python3dist(wheel)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -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 -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py312 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/python-sqlalchemy-utils-0.41.1-5.fc41.noarch-pyproject-buildrequires -x test Handling setuptools >= 40.8 from default build backend Requirement satisfied: setuptools >= 40.8 (installed: setuptools 69.2.0) Handling wheel from default build backend Requirement satisfied: wheel (installed: wheel 0.43.0) running egg_info writing SQLAlchemy_Utils.egg-info/PKG-INFO writing dependency_links to SQLAlchemy_Utils.egg-info/dependency_links.txt writing requirements to SQLAlchemy_Utils.egg-info/requires.txt writing top-level names to SQLAlchemy_Utils.egg-info/top_level.txt reading manifest file 'SQLAlchemy_Utils.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' no previously-included directories found matching 'docs/_build' warning: no previously-included files found matching 'docs/_themes/.git' adding license file 'LICENSE' writing manifest file 'SQLAlchemy_Utils.egg-info/SOURCES.txt' Handling wheel from get_requires_for_build_wheel Requirement satisfied: wheel (installed: wheel 0.43.0) running dist_info writing SQLAlchemy_Utils.egg-info/PKG-INFO writing dependency_links to SQLAlchemy_Utils.egg-info/dependency_links.txt writing requirements to SQLAlchemy_Utils.egg-info/requires.txt writing top-level names to SQLAlchemy_Utils.egg-info/top_level.txt reading manifest file 'SQLAlchemy_Utils.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' no previously-included directories found matching 'docs/_build' warning: no previously-included files found matching 'docs/_themes/.git' adding license file 'LICENSE' writing manifest file 'SQLAlchemy_Utils.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/SQLAlchemy_Utils-0.41.1.dist-info' Handling SQLAlchemy <2,>=1.3 from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement not satisfied: SQLAlchemy <2,>=1.3 Handling importlib-metadata ; python_version < "3.8" from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: importlib-metadata ; python_version < "3.8" Handling arrow >=0.3.4 ; extra == 'arrow' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: arrow >=0.3.4 ; extra == 'arrow' Handling Babel >=1.3 ; extra == 'babel' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: Babel >=1.3 ; extra == 'babel' Handling colour >=0.0.4 ; extra == 'color' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: colour >=0.0.4 ; extra == 'color' Handling cryptography >=0.6 ; extra == 'encrypted' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: cryptography >=0.6 ; extra == 'encrypted' Handling intervals >=0.7.1 ; extra == 'intervals' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: intervals >=0.7.1 ; extra == 'intervals' Handling passlib <2.0,>=1.6 ; extra == 'password' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: passlib <2.0,>=1.6 ; extra == 'password' Handling pendulum >=2.0.5 ; extra == 'pendulum' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pendulum >=2.0.5 ; extra == 'pendulum' Handling phonenumbers >=5.9.2 ; extra == 'phone' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: phonenumbers >=5.9.2 ; extra == 'phone' Handling pytest >=2.7.1 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: pytest >=2.7.1 ; extra == 'test' (installed: pytest 7.4.3) Handling Pygments >=1.2 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement not satisfied: Pygments >=1.2 ; extra == 'test' Handling Jinja2 >=2.3 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement not satisfied: Jinja2 >=2.3 ; extra == 'test' Handling docutils >=0.10 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement not satisfied: docutils >=0.10 ; extra == 'test' Handling flexmock >=0.9.7 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement not satisfied: flexmock >=0.9.7 ; extra == 'test' Handling psycopg >=3.1.8 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement not satisfied: psycopg >=3.1.8 ; extra == 'test' Handling psycopg2 >=2.5.1 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement not satisfied: psycopg2 >=2.5.1 ; extra == 'test' Handling pg8000 >=1.12.4 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement not satisfied: pg8000 >=1.12.4 ; extra == 'test' Handling pytz >=2014.2 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement not satisfied: pytz >=2014.2 ; extra == 'test' Handling python-dateutil >=2.6 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement not satisfied: python-dateutil >=2.6 ; extra == 'test' Handling pymysql ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement not satisfied: pymysql ; extra == 'test' Handling flake8 >=2.4.0 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement not satisfied: flake8 >=2.4.0 ; extra == 'test' Handling isort >=4.2.2 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement not satisfied: isort >=4.2.2 ; extra == 'test' Handling backports.zoneinfo ; (python_version < "3.9") and extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: backports.zoneinfo ; (python_version < "3.9") and extra == 'test' Handling Babel >=1.3 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: Babel >=1.3 ; extra == 'test_all' Handling Jinja2 >=2.3 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: Jinja2 >=2.3 ; extra == 'test_all' Handling Pygments >=1.2 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: Pygments >=1.2 ; extra == 'test_all' Handling arrow >=0.3.4 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: arrow >=0.3.4 ; extra == 'test_all' Handling colour >=0.0.4 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: colour >=0.0.4 ; extra == 'test_all' Handling cryptography >=0.6 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: cryptography >=0.6 ; extra == 'test_all' Handling docutils >=0.10 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: docutils >=0.10 ; extra == 'test_all' Handling flake8 >=2.4.0 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: flake8 >=2.4.0 ; extra == 'test_all' Handling flexmock >=0.9.7 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: flexmock >=0.9.7 ; extra == 'test_all' Handling furl >=0.4.1 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: furl >=0.4.1 ; extra == 'test_all' Handling intervals >=0.7.1 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: intervals >=0.7.1 ; extra == 'test_all' Handling isort >=4.2.2 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: isort >=4.2.2 ; extra == 'test_all' Handling passlib <2.0,>=1.6 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: passlib <2.0,>=1.6 ; extra == 'test_all' Handling pendulum >=2.0.5 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pendulum >=2.0.5 ; extra == 'test_all' Handling pg8000 >=1.12.4 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pg8000 >=1.12.4 ; extra == 'test_all' Handling phonenumbers >=5.9.2 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: phonenumbers >=5.9.2 ; extra == 'test_all' Handling psycopg2 >=2.5.1 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: psycopg2 >=2.5.1 ; extra == 'test_all' Handling psycopg >=3.1.8 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: psycopg >=3.1.8 ; extra == 'test_all' Handling pymysql ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pymysql ; extra == 'test_all' Handling pytest >=2.7.1 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pytest >=2.7.1 ; extra == 'test_all' Handling python-dateutil ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: python-dateutil ; extra == 'test_all' Handling python-dateutil >=2.6 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: python-dateutil >=2.6 ; extra == 'test_all' Handling pytz >=2014.2 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pytz >=2014.2 ; extra == 'test_all' Handling backports.zoneinfo ; (python_version < "3.9") and extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: backports.zoneinfo ; (python_version < "3.9") and extra == 'test_all' Handling python-dateutil ; extra == 'timezone' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: python-dateutil ; extra == 'timezone' Handling furl >=0.4.1 ; extra == 'url' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: furl >=0.4.1 ; extra == 'url' + cat /builddir/build/BUILD/python-sqlalchemy-utils-0.41.1-5.fc41.noarch-pyproject-buildrequires + rm -rfv SQLAlchemy_Utils-0.41.1.dist-info/ removed 'SQLAlchemy_Utils-0.41.1.dist-info/top_level.txt' removed 'SQLAlchemy_Utils-0.41.1.dist-info/METADATA' removed 'SQLAlchemy_Utils-0.41.1.dist-info/LICENSE' removed directory 'SQLAlchemy_Utils-0.41.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-sqlalchemy-utils-0.41.1-5.fc41.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-sqlalchemy-utils.spec'], chrootPath='/var/lib/mock/f41-build-106409-6179/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=997gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.b2dabr7t:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueraiseExc=FalseprintOutput=False) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.b2dabr7t:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', 'b157dd736cd84879a8152a7ba770fd17', '-D', '/var/lib/mock/f41-build-106409-6179/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.b2dabr7t:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -br --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-sqlalchemy-utils.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1711324800 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.jz5UHG + umask 022 + cd /builddir/build/BUILD + cd SQLAlchemy-Utils-0.41.1 + CFLAGS='-O2 -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 -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -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 -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -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 ']' + '[' -f setup.py ']' + echo 'python3dist(setuptools) >= 40.8' + echo 'python3dist(wheel)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -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 -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py312 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/python-sqlalchemy-utils-0.41.1-5.fc41.noarch-pyproject-buildrequires -x test Handling setuptools >= 40.8 from default build backend Requirement satisfied: setuptools >= 40.8 (installed: setuptools 69.2.0) Handling wheel from default build backend Requirement satisfied: wheel (installed: wheel 0.43.0) running egg_info writing SQLAlchemy_Utils.egg-info/PKG-INFO writing dependency_links to SQLAlchemy_Utils.egg-info/dependency_links.txt writing requirements to SQLAlchemy_Utils.egg-info/requires.txt writing top-level names to SQLAlchemy_Utils.egg-info/top_level.txt reading manifest file 'SQLAlchemy_Utils.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' no previously-included directories found matching 'docs/_build' warning: no previously-included files found matching 'docs/_themes/.git' adding license file 'LICENSE' writing manifest file 'SQLAlchemy_Utils.egg-info/SOURCES.txt' Handling wheel from get_requires_for_build_wheel Requirement satisfied: wheel (installed: wheel 0.43.0) running dist_info writing SQLAlchemy_Utils.egg-info/PKG-INFO writing dependency_links to SQLAlchemy_Utils.egg-info/dependency_links.txt writing requirements to SQLAlchemy_Utils.egg-info/requires.txt writing top-level names to SQLAlchemy_Utils.egg-info/top_level.txt reading manifest file 'SQLAlchemy_Utils.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' no previously-included directories found matching 'docs/_build' warning: no previously-included files found matching 'docs/_themes/.git' adding license file 'LICENSE' writing manifest file 'SQLAlchemy_Utils.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/SQLAlchemy_Utils-0.41.1.dist-info' Handling SQLAlchemy <2,>=1.3 from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: SQLAlchemy <2,>=1.3 (installed: SQLAlchemy 1.4.52) Handling importlib-metadata ; python_version < "3.8" from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: importlib-metadata ; python_version < "3.8" Handling arrow >=0.3.4 ; extra == 'arrow' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: arrow >=0.3.4 ; extra == 'arrow' Handling Babel >=1.3 ; extra == 'babel' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: Babel >=1.3 ; extra == 'babel' Handling colour >=0.0.4 ; extra == 'color' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: colour >=0.0.4 ; extra == 'color' Handling cryptography >=0.6 ; extra == 'encrypted' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: cryptography >=0.6 ; extra == 'encrypted' Handling intervals >=0.7.1 ; extra == 'intervals' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: intervals >=0.7.1 ; extra == 'intervals' Handling passlib <2.0,>=1.6 ; extra == 'password' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: passlib <2.0,>=1.6 ; extra == 'password' Handling pendulum >=2.0.5 ; extra == 'pendulum' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pendulum >=2.0.5 ; extra == 'pendulum' Handling phonenumbers >=5.9.2 ; extra == 'phone' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: phonenumbers >=5.9.2 ; extra == 'phone' Handling pytest >=2.7.1 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: pytest >=2.7.1 ; extra == 'test' (installed: pytest 7.4.3) Handling Pygments >=1.2 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: Pygments >=1.2 ; extra == 'test' (installed: Pygments 2.17.2) Handling Jinja2 >=2.3 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: Jinja2 >=2.3 ; extra == 'test' (installed: Jinja2 3.1.3) Handling docutils >=0.10 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: docutils >=0.10 ; extra == 'test' (installed: docutils 0.20.1) Handling flexmock >=0.9.7 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: flexmock >=0.9.7 ; extra == 'test' (installed: flexmock 0.12.1) Handling psycopg >=3.1.8 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: psycopg >=3.1.8 ; extra == 'test' (installed: psycopg 3.1.10) Handling psycopg2 >=2.5.1 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: psycopg2 >=2.5.1 ; extra == 'test' (installed: psycopg2 2.9.9) Handling pg8000 >=1.12.4 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: pg8000 >=1.12.4 ; extra == 'test' (installed: pg8000 1.30.4) Handling pytz >=2014.2 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: pytz >=2014.2 ; extra == 'test' (installed: pytz 2024.1) Handling python-dateutil >=2.6 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: python-dateutil >=2.6 ; extra == 'test' (installed: python-dateutil 2.8.2) Handling pymysql ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: pymysql ; extra == 'test' (installed: pymysql 1.1.0) Handling flake8 >=2.4.0 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: flake8 >=2.4.0 ; extra == 'test' (installed: flake8 6.1.0) Handling isort >=4.2.2 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: isort >=4.2.2 ; extra == 'test' (installed: isort 5.13.2) Handling backports.zoneinfo ; (python_version < "3.9") and extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: backports.zoneinfo ; (python_version < "3.9") and extra == 'test' Handling Babel >=1.3 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: Babel >=1.3 ; extra == 'test_all' Handling Jinja2 >=2.3 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: Jinja2 >=2.3 ; extra == 'test_all' Handling Pygments >=1.2 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: Pygments >=1.2 ; extra == 'test_all' Handling arrow >=0.3.4 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: arrow >=0.3.4 ; extra == 'test_all' Handling colour >=0.0.4 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: colour >=0.0.4 ; extra == 'test_all' Handling cryptography >=0.6 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: cryptography >=0.6 ; extra == 'test_all' Handling docutils >=0.10 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: docutils >=0.10 ; extra == 'test_all' Handling flake8 >=2.4.0 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: flake8 >=2.4.0 ; extra == 'test_all' Handling flexmock >=0.9.7 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: flexmock >=0.9.7 ; extra == 'test_all' Handling furl >=0.4.1 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: furl >=0.4.1 ; extra == 'test_all' Handling intervals >=0.7.1 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: intervals >=0.7.1 ; extra == 'test_all' Handling isort >=4.2.2 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: isort >=4.2.2 ; extra == 'test_all' Handling passlib <2.0,>=1.6 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: passlib <2.0,>=1.6 ; extra == 'test_all' Handling pendulum >=2.0.5 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pendulum >=2.0.5 ; extra == 'test_all' Handling pg8000 >=1.12.4 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pg8000 >=1.12.4 ; extra == 'test_all' Handling phonenumbers >=5.9.2 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: phonenumbers >=5.9.2 ; extra == 'test_all' Handling psycopg2 >=2.5.1 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: psycopg2 >=2.5.1 ; extra == 'test_all' Handling psycopg >=3.1.8 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: psycopg >=3.1.8 ; extra == 'test_all' Handling pymysql ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pymysql ; extra == 'test_all' Handling pytest >=2.7.1 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pytest >=2.7.1 ; extra == 'test_all' Handling python-dateutil ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: python-dateutil ; extra == 'test_all' Handling python-dateutil >=2.6 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: python-dateutil >=2.6 ; extra == 'test_all' Handling pytz >=2014.2 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pytz >=2014.2 ; extra == 'test_all' Handling backports.zoneinfo ; (python_version < "3.9") and extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: backports.zoneinfo ; (python_version < "3.9") and extra == 'test_all' Handling python-dateutil ; extra == 'timezone' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: python-dateutil ; extra == 'timezone' Handling furl >=0.4.1 ; extra == 'url' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: furl >=0.4.1 ; extra == 'url' + cat /builddir/build/BUILD/python-sqlalchemy-utils-0.41.1-5.fc41.noarch-pyproject-buildrequires + rm -rfv SQLAlchemy_Utils-0.41.1.dist-info/ removed 'SQLAlchemy_Utils-0.41.1.dist-info/top_level.txt' removed 'SQLAlchemy_Utils-0.41.1.dist-info/METADATA' removed 'SQLAlchemy_Utils-0.41.1.dist-info/LICENSE' removed directory 'SQLAlchemy_Utils-0.41.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-sqlalchemy-utils-0.41.1-5.fc41.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-sqlalchemy-utils.spec'], chrootPath='/var/lib/mock/f41-build-106409-6179/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=997gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.b2dabr7t:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueprintOutput=False) Using nspawn with args ['--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.b2dabr7t:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '5573336ac0b348f69c3231f78099ac30', '-D', '/var/lib/mock/f41-build-106409-6179/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.b2dabr7t:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/mapper/control', '--bind=/dev/fuse', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-sqlalchemy-utils.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1711324800 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.LWfghy + umask 022 + cd /builddir/build/BUILD + cd SQLAlchemy-Utils-0.41.1 + CFLAGS='-O2 -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 -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -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 -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -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 ']' + '[' -f setup.py ']' + echo 'python3dist(setuptools) >= 40.8' + echo 'python3dist(wheel)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -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 -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.pyproject-builddir + RPM_TOXENV=py312 + HOSTNAME=rpmbuild + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/pyproject-wheeldir --output /builddir/build/BUILD/python-sqlalchemy-utils-0.41.1-5.fc41.noarch-pyproject-buildrequires -x test Handling setuptools >= 40.8 from default build backend Requirement satisfied: setuptools >= 40.8 (installed: setuptools 69.2.0) Handling wheel from default build backend Requirement satisfied: wheel (installed: wheel 0.43.0) running egg_info writing SQLAlchemy_Utils.egg-info/PKG-INFO writing dependency_links to SQLAlchemy_Utils.egg-info/dependency_links.txt writing requirements to SQLAlchemy_Utils.egg-info/requires.txt writing top-level names to SQLAlchemy_Utils.egg-info/top_level.txt reading manifest file 'SQLAlchemy_Utils.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' no previously-included directories found matching 'docs/_build' warning: no previously-included files found matching 'docs/_themes/.git' adding license file 'LICENSE' writing manifest file 'SQLAlchemy_Utils.egg-info/SOURCES.txt' Handling wheel from get_requires_for_build_wheel Requirement satisfied: wheel (installed: wheel 0.43.0) running dist_info writing SQLAlchemy_Utils.egg-info/PKG-INFO writing dependency_links to SQLAlchemy_Utils.egg-info/dependency_links.txt writing requirements to SQLAlchemy_Utils.egg-info/requires.txt writing top-level names to SQLAlchemy_Utils.egg-info/top_level.txt reading manifest file 'SQLAlchemy_Utils.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' no previously-included directories found matching 'docs/_build' warning: no previously-included files found matching 'docs/_themes/.git' adding license file 'LICENSE' writing manifest file 'SQLAlchemy_Utils.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/SQLAlchemy_Utils-0.41.1.dist-info' Handling SQLAlchemy <2,>=1.3 from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: SQLAlchemy <2,>=1.3 (installed: SQLAlchemy 1.4.52) Handling importlib-metadata ; python_version < "3.8" from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: importlib-metadata ; python_version < "3.8" Handling arrow >=0.3.4 ; extra == 'arrow' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: arrow >=0.3.4 ; extra == 'arrow' Handling Babel >=1.3 ; extra == 'babel' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: Babel >=1.3 ; extra == 'babel' Handling colour >=0.0.4 ; extra == 'color' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: colour >=0.0.4 ; extra == 'color' Handling cryptography >=0.6 ; extra == 'encrypted' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: cryptography >=0.6 ; extra == 'encrypted' Handling intervals >=0.7.1 ; extra == 'intervals' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: intervals >=0.7.1 ; extra == 'intervals' Handling passlib <2.0,>=1.6 ; extra == 'password' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: passlib <2.0,>=1.6 ; extra == 'password' Handling pendulum >=2.0.5 ; extra == 'pendulum' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pendulum >=2.0.5 ; extra == 'pendulum' Handling phonenumbers >=5.9.2 ; extra == 'phone' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: phonenumbers >=5.9.2 ; extra == 'phone' Handling pytest >=2.7.1 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: pytest >=2.7.1 ; extra == 'test' (installed: pytest 7.4.3) Handling Pygments >=1.2 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: Pygments >=1.2 ; extra == 'test' (installed: Pygments 2.17.2) Handling Jinja2 >=2.3 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: Jinja2 >=2.3 ; extra == 'test' (installed: Jinja2 3.1.3) Handling docutils >=0.10 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: docutils >=0.10 ; extra == 'test' (installed: docutils 0.20.1) Handling flexmock >=0.9.7 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: flexmock >=0.9.7 ; extra == 'test' (installed: flexmock 0.12.1) Handling psycopg >=3.1.8 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: psycopg >=3.1.8 ; extra == 'test' (installed: psycopg 3.1.10) Handling psycopg2 >=2.5.1 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: psycopg2 >=2.5.1 ; extra == 'test' (installed: psycopg2 2.9.9) Handling pg8000 >=1.12.4 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: pg8000 >=1.12.4 ; extra == 'test' (installed: pg8000 1.30.4) Handling pytz >=2014.2 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: pytz >=2014.2 ; extra == 'test' (installed: pytz 2024.1) Handling python-dateutil >=2.6 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: python-dateutil >=2.6 ; extra == 'test' (installed: python-dateutil 2.8.2) Handling pymysql ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: pymysql ; extra == 'test' (installed: pymysql 1.1.0) Handling flake8 >=2.4.0 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: flake8 >=2.4.0 ; extra == 'test' (installed: flake8 6.1.0) Handling isort >=4.2.2 ; extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Requirement satisfied: isort >=4.2.2 ; extra == 'test' (installed: isort 5.13.2) Handling backports.zoneinfo ; (python_version < "3.9") and extra == 'test' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: backports.zoneinfo ; (python_version < "3.9") and extra == 'test' Handling Babel >=1.3 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: Babel >=1.3 ; extra == 'test_all' Handling Jinja2 >=2.3 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: Jinja2 >=2.3 ; extra == 'test_all' Handling Pygments >=1.2 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: Pygments >=1.2 ; extra == 'test_all' Handling arrow >=0.3.4 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: arrow >=0.3.4 ; extra == 'test_all' Handling colour >=0.0.4 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: colour >=0.0.4 ; extra == 'test_all' Handling cryptography >=0.6 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: cryptography >=0.6 ; extra == 'test_all' Handling docutils >=0.10 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: docutils >=0.10 ; extra == 'test_all' Handling flake8 >=2.4.0 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: flake8 >=2.4.0 ; extra == 'test_all' Handling flexmock >=0.9.7 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: flexmock >=0.9.7 ; extra == 'test_all' Handling furl >=0.4.1 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: furl >=0.4.1 ; extra == 'test_all' Handling intervals >=0.7.1 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: intervals >=0.7.1 ; extra == 'test_all' Handling isort >=4.2.2 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: isort >=4.2.2 ; extra == 'test_all' Handling passlib <2.0,>=1.6 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: passlib <2.0,>=1.6 ; extra == 'test_all' Handling pendulum >=2.0.5 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pendulum >=2.0.5 ; extra == 'test_all' Handling pg8000 >=1.12.4 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pg8000 >=1.12.4 ; extra == 'test_all' Handling phonenumbers >=5.9.2 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: phonenumbers >=5.9.2 ; extra == 'test_all' Handling psycopg2 >=2.5.1 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: psycopg2 >=2.5.1 ; extra == 'test_all' Handling psycopg >=3.1.8 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: psycopg >=3.1.8 ; extra == 'test_all' Handling pymysql ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pymysql ; extra == 'test_all' Handling pytest >=2.7.1 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pytest >=2.7.1 ; extra == 'test_all' Handling python-dateutil ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: python-dateutil ; extra == 'test_all' Handling python-dateutil >=2.6 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: python-dateutil >=2.6 ; extra == 'test_all' Handling pytz >=2014.2 ; extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: pytz >=2014.2 ; extra == 'test_all' Handling backports.zoneinfo ; (python_version < "3.9") and extra == 'test_all' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: backports.zoneinfo ; (python_version < "3.9") and extra == 'test_all' Handling python-dateutil ; extra == 'timezone' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: python-dateutil ; extra == 'timezone' Handling furl >=0.4.1 ; extra == 'url' from hook generated metadata: Requires-Dist (SQLAlchemy-Utils) Ignoring alien requirement: furl >=0.4.1 ; extra == 'url' + cat /builddir/build/BUILD/python-sqlalchemy-utils-0.41.1-5.fc41.noarch-pyproject-buildrequires + rm -rfv SQLAlchemy_Utils-0.41.1.dist-info/ removed 'SQLAlchemy_Utils-0.41.1.dist-info/top_level.txt' removed 'SQLAlchemy_Utils-0.41.1.dist-info/METADATA' removed 'SQLAlchemy_Utils-0.41.1.dist-info/LICENSE' removed directory 'SQLAlchemy_Utils-0.41.1.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.Ow0rc6 + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -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 -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -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 -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -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 SQLAlchemy-Utils-0.41.1 + mkdir -p /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/.pyproject-builddir + CFLAGS='-O2 -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 -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/.pyproject-builddir + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_wheel.py /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/pyproject-wheeldir Processing /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1 Preparing metadata (pyproject.toml): started Running command Preparing metadata (pyproject.toml) running dist_info creating /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/.pyproject-builddir/pip-modern-metadata-g4qf_hvp/SQLAlchemy_Utils.egg-info writing /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/.pyproject-builddir/pip-modern-metadata-g4qf_hvp/SQLAlchemy_Utils.egg-info/PKG-INFO writing dependency_links to /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/.pyproject-builddir/pip-modern-metadata-g4qf_hvp/SQLAlchemy_Utils.egg-info/dependency_links.txt writing requirements to /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/.pyproject-builddir/pip-modern-metadata-g4qf_hvp/SQLAlchemy_Utils.egg-info/requires.txt writing top-level names to /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/.pyproject-builddir/pip-modern-metadata-g4qf_hvp/SQLAlchemy_Utils.egg-info/top_level.txt writing manifest file '/builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/.pyproject-builddir/pip-modern-metadata-g4qf_hvp/SQLAlchemy_Utils.egg-info/SOURCES.txt' reading manifest file '/builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/.pyproject-builddir/pip-modern-metadata-g4qf_hvp/SQLAlchemy_Utils.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' no previously-included directories found matching 'docs/_build' warning: no previously-included files found matching 'docs/_themes/.git' adding license file 'LICENSE' writing manifest file '/builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/.pyproject-builddir/pip-modern-metadata-g4qf_hvp/SQLAlchemy_Utils.egg-info/SOURCES.txt' creating '/builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/.pyproject-builddir/pip-modern-metadata-g4qf_hvp/SQLAlchemy_Utils-0.41.1.dist-info' Preparing metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: SQLAlchemy-Utils Building wheel for SQLAlchemy-Utils (pyproject.toml): started Running command Building wheel for SQLAlchemy-Utils (pyproject.toml) running bdist_wheel running build running build_py creating build creating build/lib creating build/lib/sqlalchemy_utils copying sqlalchemy_utils/asserts.py -> build/lib/sqlalchemy_utils copying sqlalchemy_utils/proxy_dict.py -> build/lib/sqlalchemy_utils copying sqlalchemy_utils/aggregates.py -> build/lib/sqlalchemy_utils copying sqlalchemy_utils/expressions.py -> build/lib/sqlalchemy_utils copying sqlalchemy_utils/view.py -> build/lib/sqlalchemy_utils copying sqlalchemy_utils/models.py -> build/lib/sqlalchemy_utils copying sqlalchemy_utils/listeners.py -> build/lib/sqlalchemy_utils copying sqlalchemy_utils/query_chain.py -> build/lib/sqlalchemy_utils copying sqlalchemy_utils/compat.py -> build/lib/sqlalchemy_utils copying sqlalchemy_utils/i18n.py -> build/lib/sqlalchemy_utils copying sqlalchemy_utils/utils.py -> build/lib/sqlalchemy_utils copying sqlalchemy_utils/exceptions.py -> build/lib/sqlalchemy_utils copying sqlalchemy_utils/operators.py -> build/lib/sqlalchemy_utils copying sqlalchemy_utils/__init__.py -> build/lib/sqlalchemy_utils copying sqlalchemy_utils/generic.py -> build/lib/sqlalchemy_utils copying sqlalchemy_utils/observer.py -> build/lib/sqlalchemy_utils copying sqlalchemy_utils/path.py -> build/lib/sqlalchemy_utils creating build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/timezone.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/arrow.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/locale.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/email.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/color.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/currency.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/ltree.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/scalar_coercible.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/bit.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/phone_number.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/uuid.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/range.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/choice.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/pg_composite.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/json.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/weekdays.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/__init__.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/country.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/ts_vector.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/password.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/url.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/ip_address.py -> build/lib/sqlalchemy_utils/types copying sqlalchemy_utils/types/scalar_list.py -> build/lib/sqlalchemy_utils/types creating build/lib/sqlalchemy_utils/primitives copying sqlalchemy_utils/primitives/currency.py -> build/lib/sqlalchemy_utils/primitives copying sqlalchemy_utils/primitives/ltree.py -> build/lib/sqlalchemy_utils/primitives copying sqlalchemy_utils/primitives/weekdays.py -> build/lib/sqlalchemy_utils/primitives copying sqlalchemy_utils/primitives/__init__.py -> build/lib/sqlalchemy_utils/primitives copying sqlalchemy_utils/primitives/country.py -> build/lib/sqlalchemy_utils/primitives copying sqlalchemy_utils/primitives/weekday.py -> build/lib/sqlalchemy_utils/primitives creating build/lib/sqlalchemy_utils/relationships copying sqlalchemy_utils/relationships/__init__.py -> build/lib/sqlalchemy_utils/relationships copying sqlalchemy_utils/relationships/chained_join.py -> build/lib/sqlalchemy_utils/relationships creating build/lib/sqlalchemy_utils/functions copying sqlalchemy_utils/functions/database.py -> build/lib/sqlalchemy_utils/functions copying sqlalchemy_utils/functions/foreign_keys.py -> build/lib/sqlalchemy_utils/functions copying sqlalchemy_utils/functions/orm.py -> build/lib/sqlalchemy_utils/functions copying sqlalchemy_utils/functions/mock.py -> build/lib/sqlalchemy_utils/functions copying sqlalchemy_utils/functions/render.py -> build/lib/sqlalchemy_utils/functions copying sqlalchemy_utils/functions/sort_query.py -> build/lib/sqlalchemy_utils/functions copying sqlalchemy_utils/functions/__init__.py -> build/lib/sqlalchemy_utils/functions creating build/lib/sqlalchemy_utils/types/encrypted copying sqlalchemy_utils/types/encrypted/encrypted_type.py -> build/lib/sqlalchemy_utils/types/encrypted copying sqlalchemy_utils/types/encrypted/padding.py -> build/lib/sqlalchemy_utils/types/encrypted copying sqlalchemy_utils/types/encrypted/__init__.py -> build/lib/sqlalchemy_utils/types/encrypted creating build/lib/sqlalchemy_utils/types/enriched_datetime copying sqlalchemy_utils/types/enriched_datetime/pendulum_datetime.py -> build/lib/sqlalchemy_utils/types/enriched_datetime copying sqlalchemy_utils/types/enriched_datetime/arrow_datetime.py -> build/lib/sqlalchemy_utils/types/enriched_datetime copying sqlalchemy_utils/types/enriched_datetime/pendulum_date.py -> build/lib/sqlalchemy_utils/types/enriched_datetime copying sqlalchemy_utils/types/enriched_datetime/__init__.py -> build/lib/sqlalchemy_utils/types/enriched_datetime copying sqlalchemy_utils/types/enriched_datetime/enriched_datetime_type.py -> build/lib/sqlalchemy_utils/types/enriched_datetime copying sqlalchemy_utils/types/enriched_datetime/enriched_date_type.py -> build/lib/sqlalchemy_utils/types/enriched_datetime running egg_info writing SQLAlchemy_Utils.egg-info/PKG-INFO writing dependency_links to SQLAlchemy_Utils.egg-info/dependency_links.txt writing requirements to SQLAlchemy_Utils.egg-info/requires.txt writing top-level names to SQLAlchemy_Utils.egg-info/top_level.txt reading manifest file 'SQLAlchemy_Utils.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.pyc' found under directory 'tests' warning: no previously-included files matching '*.pyc' found under directory 'docs' no previously-included directories found matching 'docs/_build' warning: no previously-included files found matching 'docs/_themes/.git' adding license file 'LICENSE' writing manifest file 'SQLAlchemy_Utils.egg-info/SOURCES.txt' installing to build/bdist.linux-riscv64/wheel running install running install_lib creating build/bdist.linux-riscv64 creating build/bdist.linux-riscv64/wheel creating build/bdist.linux-riscv64/wheel/sqlalchemy_utils creating build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/timezone.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/arrow.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/locale.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/email.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types creating build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types/encrypted copying build/lib/sqlalchemy_utils/types/encrypted/encrypted_type.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types/encrypted copying build/lib/sqlalchemy_utils/types/encrypted/padding.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types/encrypted copying build/lib/sqlalchemy_utils/types/encrypted/__init__.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types/encrypted copying build/lib/sqlalchemy_utils/types/color.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/currency.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/ltree.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/scalar_coercible.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/bit.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/phone_number.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/uuid.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/range.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/choice.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/pg_composite.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/json.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/weekdays.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/__init__.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/country.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/ts_vector.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types creating build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types/enriched_datetime copying build/lib/sqlalchemy_utils/types/enriched_datetime/pendulum_datetime.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types/enriched_datetime copying build/lib/sqlalchemy_utils/types/enriched_datetime/arrow_datetime.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types/enriched_datetime copying build/lib/sqlalchemy_utils/types/enriched_datetime/pendulum_date.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types/enriched_datetime copying build/lib/sqlalchemy_utils/types/enriched_datetime/__init__.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types/enriched_datetime copying build/lib/sqlalchemy_utils/types/enriched_datetime/enriched_datetime_type.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types/enriched_datetime copying build/lib/sqlalchemy_utils/types/enriched_datetime/enriched_date_type.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types/enriched_datetime copying build/lib/sqlalchemy_utils/types/password.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/url.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/ip_address.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/types/scalar_list.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/types copying build/lib/sqlalchemy_utils/asserts.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils copying build/lib/sqlalchemy_utils/proxy_dict.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils copying build/lib/sqlalchemy_utils/aggregates.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils copying build/lib/sqlalchemy_utils/expressions.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils copying build/lib/sqlalchemy_utils/view.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils copying build/lib/sqlalchemy_utils/models.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils copying build/lib/sqlalchemy_utils/listeners.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils copying build/lib/sqlalchemy_utils/query_chain.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils creating build/bdist.linux-riscv64/wheel/sqlalchemy_utils/primitives copying build/lib/sqlalchemy_utils/primitives/currency.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/primitives copying build/lib/sqlalchemy_utils/primitives/ltree.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/primitives copying build/lib/sqlalchemy_utils/primitives/weekdays.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/primitives copying build/lib/sqlalchemy_utils/primitives/__init__.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/primitives copying build/lib/sqlalchemy_utils/primitives/country.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/primitives copying build/lib/sqlalchemy_utils/primitives/weekday.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/primitives copying build/lib/sqlalchemy_utils/compat.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils copying build/lib/sqlalchemy_utils/i18n.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils creating build/bdist.linux-riscv64/wheel/sqlalchemy_utils/relationships copying build/lib/sqlalchemy_utils/relationships/__init__.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/relationships copying build/lib/sqlalchemy_utils/relationships/chained_join.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/relationships copying build/lib/sqlalchemy_utils/utils.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils copying build/lib/sqlalchemy_utils/exceptions.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils copying build/lib/sqlalchemy_utils/operators.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils copying build/lib/sqlalchemy_utils/__init__.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils creating build/bdist.linux-riscv64/wheel/sqlalchemy_utils/functions copying build/lib/sqlalchemy_utils/functions/database.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/functions copying build/lib/sqlalchemy_utils/functions/foreign_keys.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/functions copying build/lib/sqlalchemy_utils/functions/orm.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/functions copying build/lib/sqlalchemy_utils/functions/mock.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/functions copying build/lib/sqlalchemy_utils/functions/render.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/functions copying build/lib/sqlalchemy_utils/functions/sort_query.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/functions copying build/lib/sqlalchemy_utils/functions/__init__.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils/functions copying build/lib/sqlalchemy_utils/generic.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils copying build/lib/sqlalchemy_utils/observer.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils copying build/lib/sqlalchemy_utils/path.py -> build/bdist.linux-riscv64/wheel/sqlalchemy_utils running install_egg_info Copying SQLAlchemy_Utils.egg-info to build/bdist.linux-riscv64/wheel/SQLAlchemy_Utils-0.41.1-py3.12.egg-info running install_scripts creating build/bdist.linux-riscv64/wheel/SQLAlchemy_Utils-0.41.1.dist-info/WHEEL creating '/builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/.pyproject-builddir/pip-wheel-g8e7l38_/.tmp-w4mawp0h/SQLAlchemy_Utils-0.41.1-py3-none-any.whl' and adding 'build/bdist.linux-riscv64/wheel' to it adding 'sqlalchemy_utils/__init__.py' adding 'sqlalchemy_utils/aggregates.py' adding 'sqlalchemy_utils/asserts.py' adding 'sqlalchemy_utils/compat.py' adding 'sqlalchemy_utils/exceptions.py' adding 'sqlalchemy_utils/expressions.py' adding 'sqlalchemy_utils/generic.py' adding 'sqlalchemy_utils/i18n.py' adding 'sqlalchemy_utils/listeners.py' adding 'sqlalchemy_utils/models.py' adding 'sqlalchemy_utils/observer.py' adding 'sqlalchemy_utils/operators.py' adding 'sqlalchemy_utils/path.py' adding 'sqlalchemy_utils/proxy_dict.py' adding 'sqlalchemy_utils/query_chain.py' adding 'sqlalchemy_utils/utils.py' adding 'sqlalchemy_utils/view.py' adding 'sqlalchemy_utils/functions/__init__.py' adding 'sqlalchemy_utils/functions/database.py' adding 'sqlalchemy_utils/functions/foreign_keys.py' adding 'sqlalchemy_utils/functions/mock.py' adding 'sqlalchemy_utils/functions/orm.py' adding 'sqlalchemy_utils/functions/render.py' adding 'sqlalchemy_utils/functions/sort_query.py' adding 'sqlalchemy_utils/primitives/__init__.py' adding 'sqlalchemy_utils/primitives/country.py' adding 'sqlalchemy_utils/primitives/currency.py' adding 'sqlalchemy_utils/primitives/ltree.py' adding 'sqlalchemy_utils/primitives/weekday.py' adding 'sqlalchemy_utils/primitives/weekdays.py' adding 'sqlalchemy_utils/relationships/__init__.py' adding 'sqlalchemy_utils/relationships/chained_join.py' adding 'sqlalchemy_utils/types/__init__.py' adding 'sqlalchemy_utils/types/arrow.py' adding 'sqlalchemy_utils/types/bit.py' adding 'sqlalchemy_utils/types/choice.py' adding 'sqlalchemy_utils/types/color.py' adding 'sqlalchemy_utils/types/country.py' adding 'sqlalchemy_utils/types/currency.py' adding 'sqlalchemy_utils/types/email.py' adding 'sqlalchemy_utils/types/ip_address.py' adding 'sqlalchemy_utils/types/json.py' adding 'sqlalchemy_utils/types/locale.py' adding 'sqlalchemy_utils/types/ltree.py' adding 'sqlalchemy_utils/types/password.py' adding 'sqlalchemy_utils/types/pg_composite.py' adding 'sqlalchemy_utils/types/phone_number.py' adding 'sqlalchemy_utils/types/range.py' adding 'sqlalchemy_utils/types/scalar_coercible.py' adding 'sqlalchemy_utils/types/scalar_list.py' adding 'sqlalchemy_utils/types/timezone.py' adding 'sqlalchemy_utils/types/ts_vector.py' adding 'sqlalchemy_utils/types/url.py' adding 'sqlalchemy_utils/types/uuid.py' adding 'sqlalchemy_utils/types/weekdays.py' adding 'sqlalchemy_utils/types/encrypted/__init__.py' adding 'sqlalchemy_utils/types/encrypted/encrypted_type.py' adding 'sqlalchemy_utils/types/encrypted/padding.py' adding 'sqlalchemy_utils/types/enriched_datetime/__init__.py' adding 'sqlalchemy_utils/types/enriched_datetime/arrow_datetime.py' adding 'sqlalchemy_utils/types/enriched_datetime/enriched_date_type.py' adding 'sqlalchemy_utils/types/enriched_datetime/enriched_datetime_type.py' adding 'sqlalchemy_utils/types/enriched_datetime/pendulum_date.py' adding 'sqlalchemy_utils/types/enriched_datetime/pendulum_datetime.py' adding 'SQLAlchemy_Utils-0.41.1.dist-info/LICENSE' adding 'SQLAlchemy_Utils-0.41.1.dist-info/METADATA' adding 'SQLAlchemy_Utils-0.41.1.dist-info/WHEEL' adding 'SQLAlchemy_Utils-0.41.1.dist-info/top_level.txt' adding 'SQLAlchemy_Utils-0.41.1.dist-info/RECORD' removing build/bdist.linux-riscv64/wheel Building wheel for SQLAlchemy-Utils (pyproject.toml): finished with status 'done' Created wheel for SQLAlchemy-Utils: filename=SQLAlchemy_Utils-0.41.1-py3-none-any.whl size=92132 sha256=417ef0fe6c0b3184dbbebf74607a560a13a498bd14a9f0d445309965f90f0f89 Stored in directory: /builddir/.cache/pip/wheels/38/ea/ea/2f66a23429354a167780b4f59acbec2fc5ff5c02ca29617ff0 Successfully built SQLAlchemy-Utils + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.KUGP4A + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch ++ dirname /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch + CFLAGS='-O2 -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 -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -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 -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -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 SQLAlchemy-Utils-0.41.1 ++ xargs basename --multiple ++ ls /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/pyproject-wheeldir/SQLAlchemy_Utils-0.41.1-py3-none-any.whl ++ sed -E 's/([^-]+)-([^-]+)-.+\.whl/\1==\2/' + specifier=SQLAlchemy_Utils==0.41.1 + '[' -z SQLAlchemy_Utils==0.41.1 ']' + TMPDIR=/builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/.pyproject-builddir + /usr/bin/python3 -m pip install --root /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.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/SQLAlchemy-Utils-0.41.1/pyproject-wheeldir SQLAlchemy_Utils==0.41.1 Using pip 24.0 from /usr/lib/python3.12/site-packages/pip (python 3.12) Looking in links: /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/pyproject-wheeldir Processing ./pyproject-wheeldir/SQLAlchemy_Utils-0.41.1-py3-none-any.whl Installing collected packages: SQLAlchemy_Utils Successfully installed SQLAlchemy_Utils-0.41.1 + '[' -d /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/bin ']' + rm -f /builddir/build/BUILD/python-sqlalchemy-utils-0.41.1-5.fc41.noarch-pyproject-ghost-distinfo + site_dirs=() + '[' -d /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/lib/python3.12/site-packages ']' + site_dirs+=("/usr/lib/python3.12/site-packages") + '[' /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/lib64/python3.12/site-packages '!=' /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/lib/python3.12/site-packages ']' + '[' -d /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/lib64/python3.12/site-packages ']' + for site_dir in ${site_dirs[@]} + for distinfo in /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch$site_dir/*.dist-info + echo '%ghost /usr/lib/python3.12/site-packages/SQLAlchemy_Utils-0.41.1.dist-info' + sed -i s/pip/rpm/ /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/lib/python3.12/site-packages/SQLAlchemy_Utils-0.41.1.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-sqlalchemy-utils-0.41.1-5.fc41.noarch --record /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/lib/python3.12/site-packages/SQLAlchemy_Utils-0.41.1.dist-info/RECORD --output /builddir/build/BUILD/python-sqlalchemy-utils-0.41.1-5.fc41.noarch-pyproject-record + rm -fv /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/lib/python3.12/site-packages/SQLAlchemy_Utils-0.41.1.dist-info/RECORD removed '/builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/lib/python3.12/site-packages/SQLAlchemy_Utils-0.41.1.dist-info/RECORD' + rm -fv /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/lib/python3.12/site-packages/SQLAlchemy_Utils-0.41.1.dist-info/REQUESTED removed '/builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/lib/python3.12/site-packages/SQLAlchemy_Utils-0.41.1.dist-info/REQUESTED' ++ wc -l /builddir/build/BUILD/python-sqlalchemy-utils-0.41.1-5.fc41.noarch-pyproject-ghost-distinfo ++ cut -f1 '-d ' + lines=1 + '[' 1 -ne 1 ']' + RPM_PERCENTAGES_COUNT=2 + /usr/bin/python3 /usr/lib/rpm/redhat/pyproject_save_files.py --output-files /builddir/build/BUILD/python-sqlalchemy-utils-0.41.1-5.fc41.noarch-pyproject-files --output-modules /builddir/build/BUILD/python-sqlalchemy-utils-0.41.1-5.fc41.noarch-pyproject-modules --buildroot /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch --sitelib /usr/lib/python3.12/site-packages --sitearch /usr/lib64/python3.12/site-packages --python-version 3.12 --pyproject-record /builddir/build/BUILD/python-sqlalchemy-utils-0.41.1-5.fc41.noarch-pyproject-record --prefix /usr sqlalchemy_utils + /usr/bin/find-debuginfo -j32 --strict-build-id -m -i --build-id-seed 0.41.1-5.fc41 --unique-debug-suffix -0.41.1-5.fc41.noarch --unique-debug-src-base python-sqlalchemy-utils-0.41.1-5.fc41.noarch --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1 find-debuginfo: starting Extracting debug info from 0 files Creating .debug symlinks for symlinks to ELF files find: ‘debug’: No such file or directory find-debuginfo: done + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/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 -j32 Bytecompiling .py files below /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/lib/python3.12 using python3.12 + /usr/lib/rpm/redhat/brp-python-hardlink Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.o0rmPv + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -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 -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -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 -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -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 SQLAlchemy-Utils-0.41.1 + CFLAGS='-O2 -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 -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors -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-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/lib64/python3.12/site-packages:/builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/lib/python3.12/site-packages + PYTHONDONTWRITEBYTECODE=1 + PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/.pyproject-builddir' + PYTEST_XDIST_AUTO_NUM_WORKERS=32 + /usr/bin/pytest ============================= test session starts ============================== platform linux -- Python 3.12.3, pytest-7.4.3, pluggy-1.3.0 rootdir: /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1 plugins: flexmock-0.12.1 collected 2684 items tests/test_asserts.py EEEEEEEEEEEEEEEEE [ 0%] tests/test_auto_delete_orphans.py ... [ 0%] tests/test_case_insensitive_comparator.py .... [ 0%] tests/test_compat.py ........ [ 1%] tests/test_expressions.py ..... [ 1%] tests/test_instant_defaults_listener.py ... [ 1%] tests/test_instrumented_list.py .. [ 1%] tests/test_models.py ..... [ 1%] tests/test_path.py ............................ [ 2%] tests/test_proxy_dict.py ........ [ 3%] tests/test_query_chain.py ......... [ 3%] tests/test_translation_hybrid.py sssssssssssss [ 3%] tests/test_views.py EEEEEE.x [ 4%] tests/aggregate/test_backrefs.py ... [ 4%] tests/aggregate/test_custom_select_expressions.py EE [ 4%] tests/aggregate/test_join_table_inheritance.py .EEEE [ 4%] tests/aggregate/test_m2m.py EE [ 4%] tests/aggregate/test_m2m_m2m.py E [ 4%] tests/aggregate/test_multiple_aggregates_per_class.py ... [ 4%] tests/aggregate/test_o2m_m2m.py E [ 4%] tests/aggregate/test_o2m_o2m.py E [ 4%] tests/aggregate/test_o2m_o2m_o2m.py EE [ 4%] tests/aggregate/test_search_vectors.py E [ 4%] tests/aggregate/test_simple_paths.py ... [ 5%] tests/aggregate/test_with_column_alias.py ... [ 5%] tests/aggregate/test_with_ondelete_cascade.py E [ 5%] tests/functions/test_cast_if.py ...... [ 5%] tests/functions/test_database.py ....FFFFFsFFFs [ 5%] tests/functions/test_dependent_objects.py ....... [ 6%] tests/functions/test_escape_like.py . [ 6%] tests/functions/test_get_bind.py .... [ 6%] tests/functions/test_get_class_by_table.py ..... [ 6%] tests/functions/test_get_column_key.py ... [ 6%] tests/functions/test_get_columns.py ......... [ 7%] tests/functions/test_get_hybrid_properties.py ... [ 7%] tests/functions/test_get_mapper.py ................ [ 7%] tests/functions/test_get_primary_keys.py ..... [ 7%] tests/functions/test_get_referencing_foreign_keys.py .... [ 8%] tests/functions/test_get_tables.py ........ [ 8%] tests/functions/test_get_type.py ...... [ 8%] tests/functions/test_getdotattr.py ... [ 8%] tests/functions/test_has_changes.py ...... [ 8%] tests/functions/test_has_index.py ........ [ 9%] tests/functions/test_has_unique_index.py ......... [ 9%] tests/functions/test_identity.py ...... [ 9%] tests/functions/test_is_loaded.py .. [ 9%] tests/functions/test_json_sql.py EEEEEEEE [ 10%] tests/functions/test_jsonb_sql.py EEEEEEEE [ 10%] tests/functions/test_make_order_by_deterministic.py .......... [ 10%] tests/functions/test_merge_references.py ..... [ 11%] tests/functions/test_naturally_equivalent.py .. [ 11%] tests/functions/test_non_indexed_foreign_keys.py . [ 11%] tests/functions/test_quote.py .. [ 11%] tests/functions/test_render.py ...... [ 11%] tests/functions/test_table_name.py ... [ 11%] tests/generic_relationship/test_abstract_base_class.py ....... [ 11%] tests/generic_relationship/test_column_aliases.py ....... [ 12%] tests/generic_relationship/test_composite_keys.py ....... [ 12%] tests/generic_relationship/test_hybrid_properties.py . [ 12%] tests/generic_relationship/test_single_table_inheritance.py ........ [ 12%] tests/observes/test_column_property.py EEEE [ 12%] tests/observes/test_dynamic_relationship.py EE [ 12%] tests/observes/test_m2m_m2m_m2m.py EEEEE [ 13%] tests/observes/test_o2m_o2m_o2m.py EEEEE [ 13%] tests/observes/test_o2m_o2o_o2m.py EEEEE [ 13%] tests/observes/test_o2o_o2o.py E [ 13%] tests/observes/test_o2o_o2o_o2o.py EEE [ 13%] tests/primitives/test_country.py sssssssssssssssssssssss [ 14%] tests/primitives/test_currency.py sssssssssssss [ 14%] tests/primitives/test_ltree.py ......................................... [ 16%] ....................... [ 17%] tests/primitives/test_weekdays.py ssssssssssssssssssssssssssssssssssssss [ 18%] [ 18%] tests/relationships/test_chained_join.py ......... [ 19%] tests/relationships/test_select_correlated_expression.py EEEEEEEEEEE [ 19%] tests/types/test_arrow.py sssssss [ 19%] tests/types/test_choice.py ................. [ 20%] tests/types/test_color.py ..... [ 20%] tests/types/test_composite.py EEEEsssssssssEE [ 21%] tests/types/test_country.py ssss [ 21%] tests/types/test_currency.py ssss [ 21%] tests/types/test_date_range.py ssssssssssss [ 21%] tests/types/test_datetime_range.py sssssssssss [ 22%] tests/types/test_email.py .... [ 22%] tests/types/test_encrypted.py ssssssssssssssssssssssssssssssssssssssssss [ 24%] sssssssssssssssssssssss......sssssssssssssssssss [ 25%] tests/types/test_enriched_date_pendulum.py ssssss [ 26%] tests/types/test_enriched_datetime_arrow.py sssssss [ 26%] tests/types/test_enriched_datetime_pendulum.py sssss [ 26%] tests/types/test_int_range.py ssssssssssssssssssssssssssssssssssssssssss [ 28%] sssssssssssssss [ 28%] tests/types/test_ip_address.py .. [ 28%] tests/types/test_json.py .....EEEEE [ 29%] tests/types/test_locale.py sssssss [ 29%] tests/types/test_ltree.py E.EE [ 29%] tests/types/test_numeric_range.py ssssssssssssssssss [ 30%] tests/types/test_password.py sssssssssssssssssss [ 30%] tests/types/test_phonenumber.py ......................... [ 31%] tests/types/test_scalar_list.py ..... [ 31%] tests/types/test_timezone.py ........................................... [ 33%] ........................................................................ [ 36%] ........................................................................ [ 38%] ........................................................................ [ 41%] ........................................................................ [ 44%] ........................................................................ [ 46%] ........................................................................ [ 49%] ........................................................................ [ 52%] ........................................................................ [ 55%] ........................................................................ [ 57%] ........................................................................ [ 60%] ........................................................................ [ 63%] ........................................................................ [ 65%] ........................................................................ [ 68%] ........................................................................ [ 71%] ........................................................................ [ 73%] ........................................................................ [ 76%] ........................................................................ [ 79%] ........................................................................ [ 81%] ........................................................................ [ 84%] ........................................................................ [ 87%] ........................................................................ [ 89%] ........................................................................ [ 92%] ........................................................................ [ 95%] ........................................................................ [ 97%] ........................... [ 98%] tests/types/test_tsvector.py .E.E.EE [ 99%] tests/types/test_url.py sss [ 99%] tests/types/test_uuid.py ..... [ 99%] tests/types/test_weekdays.py sssssssss [ 99%] tests/types/encrypted/test_padding.py .... [100%] ==================================== ERRORS ==================================== _____ ERROR at setup of TestAssertMaxLengthWithArray.test_with_max_length ______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestAssertMaxLengthWithArray.test_smaller_than_max_length __ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of TestAssertMaxLengthWithArray.test_bigger_than_max_length __ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of TestAssertNonNullable.test_non_nullable_column _______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of TestAssertNonNullable.test_nullable_column _________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of TestAssertNullable.test_nullable_column ___________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________ ERROR at setup of TestAssertNullable.test_non_nullable_column _________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of TestAssertMaxLength.test_with_max_length __________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of TestAssertMaxLength.test_with_non_nullable_column ______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of TestAssertMaxLength.test_smaller_than_max_length ______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of TestAssertMaxLength.test_bigger_than_max_length _______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of TestAssertMinValue.test_with_min_value ___________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of TestAssertMinValue.test_smaller_than_min_value _______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of TestAssertMinValue.test_bigger_than_min_value ________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of TestAssertMaxValue.test_with_min_value ___________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of TestAssertMaxValue.test_smaller_than_max_value _______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of TestAssertMaxValue.test_bigger_than_max_value ________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of TestMaterializedViews.test_refresh_materialized_view ____ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of TestMaterializedViews.test_querying_view __________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of TestPostgresTrivialView.test_life_cycle_no_cascade _____ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of TestPostgresTrivialView.test_life_cycle_cascade _______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of TestMySqlTrivialView.test_life_cycle_no_cascade _______ self = , sock = None def connect(self, sock=None): self._closed = False try: if sock is None: if self.unix_socket: sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.settimeout(self.connect_timeout) sock.connect(self.unix_socket) self.host_info = "Localhost via UNIX socket" self._secure = True if DEBUG: print("connected using unix_socket") else: kwargs = {} if self.bind_address is not None: kwargs["source_address"] = (self.bind_address, 0) while True: try: > sock = socket.create_connection( (self.host, self.port), self.connect_timeout, **kwargs ) /usr/lib/python3.12/site-packages/pymysql/connections.py:644: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/socket.py:852: in create_connection raise exceptions[0] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ address = ('localhost', 3306), timeout = 10, source_address = None def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, source_address=None, *, all_errors=False): """Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. A host of '' or port 0 tells the OS to use the default. When a connection cannot be created, raises the last error if *all_errors* is False, and an ExceptionGroup of all errors if *all_errors* is True. """ host, port = address exceptions = [] for res in getaddrinfo(host, port, 0, SOCK_STREAM): af, socktype, proto, canonname, sa = res sock = None try: sock = socket(af, socktype, proto) if timeout is not _GLOBAL_DEFAULT_TIMEOUT: sock.settimeout(timeout) if source_address: sock.bind(source_address) > sock.connect(sa) E ConnectionRefusedError: [Errno 111] Connection refused /usr/lib64/python3.12/socket.py:837: ConnectionRefusedError During handling of the above exception, another exception occurred: self = Engine(mysql+pymysql://root@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) /usr/lib/python3.12/site-packages/pymysql/connections.py:358: in __init__ self.connect() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , sock = None def connect(self, sock=None): self._closed = False try: if sock is None: if self.unix_socket: sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.settimeout(self.connect_timeout) sock.connect(self.unix_socket) self.host_info = "Localhost via UNIX socket" self._secure = True if DEBUG: print("connected using unix_socket") else: kwargs = {} if self.bind_address is not None: kwargs["source_address"] = (self.bind_address, 0) while True: try: sock = socket.create_connection( (self.host, self.port), self.connect_timeout, **kwargs ) break except OSError as e: if e.errno == errno.EINTR: continue raise self.host_info = "socket %s:%d" % (self.host, self.port) if DEBUG: print("connected using socket") sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) sock.settimeout(None) self._sock = sock self._rfile = sock.makefile("rb") self._next_seq_id = 0 self._get_server_information() self._request_authentication() # Send "SET NAMES" query on init for: # - Ensure charaset (and collation) is set to the server. # - collation_id in handshake packet may be ignored. # - If collation is not specified, we don't know what is server's # default collation for the charset. For example, default collation # of utf8mb4 is: # - MySQL 5.7, MariaDB 10.x: utf8mb4_general_ci # - MySQL 8.0: utf8mb4_0900_ai_ci # # Reference: # - https://github.com/PyMySQL/PyMySQL/issues/1092 # - https://github.com/wagtail/wagtail/issues/9477 # - https://zenn.dev/methane/articles/2023-mysql-collation (Japanese) self.set_character_set(self.charset, self.collation) if self.sql_mode is not None: c = self.cursor() c.execute("SET sql_mode=%s", (self.sql_mode,)) c.close() if self.init_command is not None: c = self.cursor() c.execute(self.init_command) c.close() if self.autocommit_mode is not None: self.autocommit(self.autocommit_mode) except BaseException as e: self._rfile = None if sock is not None: try: sock.close() except: # noqa pass if isinstance(e, (OSError, IOError)): exc = err.OperationalError( CR.CR_CONN_HOST_ERROR, f"Can't connect to MySQL server on {self.host!r} ({e})", ) # Keep original exception and traceback to investigate error. exc.original_exception = e exc.traceback = traceback.format_exc() if DEBUG: print(exc.traceback) > raise exc E pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' ([Errno 111] Connection refused)") /usr/lib/python3.12/site-packages/pymysql/connections.py:711: OperationalError The above exception was the direct cause of the following exception: engine = Engine(mysql+pymysql://root@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) /usr/lib/python3.12/site-packages/pymysql/connections.py:358: in __init__ self.connect() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , sock = None def connect(self, sock=None): self._closed = False try: if sock is None: if self.unix_socket: sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.settimeout(self.connect_timeout) sock.connect(self.unix_socket) self.host_info = "Localhost via UNIX socket" self._secure = True if DEBUG: print("connected using unix_socket") else: kwargs = {} if self.bind_address is not None: kwargs["source_address"] = (self.bind_address, 0) while True: try: sock = socket.create_connection( (self.host, self.port), self.connect_timeout, **kwargs ) break except OSError as e: if e.errno == errno.EINTR: continue raise self.host_info = "socket %s:%d" % (self.host, self.port) if DEBUG: print("connected using socket") sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) sock.settimeout(None) self._sock = sock self._rfile = sock.makefile("rb") self._next_seq_id = 0 self._get_server_information() self._request_authentication() # Send "SET NAMES" query on init for: # - Ensure charaset (and collation) is set to the server. # - collation_id in handshake packet may be ignored. # - If collation is not specified, we don't know what is server's # default collation for the charset. For example, default collation # of utf8mb4 is: # - MySQL 5.7, MariaDB 10.x: utf8mb4_general_ci # - MySQL 8.0: utf8mb4_0900_ai_ci # # Reference: # - https://github.com/PyMySQL/PyMySQL/issues/1092 # - https://github.com/wagtail/wagtail/issues/9477 # - https://zenn.dev/methane/articles/2023-mysql-collation (Japanese) self.set_character_set(self.charset, self.collation) if self.sql_mode is not None: c = self.cursor() c.execute("SET sql_mode=%s", (self.sql_mode,)) c.close() if self.init_command is not None: c = self.cursor() c.execute(self.init_command) c.close() if self.autocommit_mode is not None: self.autocommit(self.autocommit_mode) except BaseException as e: self._rfile = None if sock is not None: try: sock.close() except: # noqa pass if isinstance(e, (OSError, IOError)): exc = err.OperationalError( CR.CR_CONN_HOST_ERROR, f"Can't connect to MySQL server on {self.host!r} ({e})", ) # Keep original exception and traceback to investigate error. exc.original_exception = e exc.traceback = traceback.format_exc() if DEBUG: print(exc.traceback) > raise exc E sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'localhost' ([Errno 111] Connection refused)") E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib/python3.12/site-packages/pymysql/connections.py:711: OperationalError ________ ERROR at setup of TestMySqlTrivialView.test_life_cycle_cascade ________ self = , sock = None def connect(self, sock=None): self._closed = False try: if sock is None: if self.unix_socket: sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.settimeout(self.connect_timeout) sock.connect(self.unix_socket) self.host_info = "Localhost via UNIX socket" self._secure = True if DEBUG: print("connected using unix_socket") else: kwargs = {} if self.bind_address is not None: kwargs["source_address"] = (self.bind_address, 0) while True: try: > sock = socket.create_connection( (self.host, self.port), self.connect_timeout, **kwargs ) /usr/lib/python3.12/site-packages/pymysql/connections.py:644: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/socket.py:852: in create_connection raise exceptions[0] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ address = ('localhost', 3306), timeout = 10, source_address = None def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, source_address=None, *, all_errors=False): """Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. A host of '' or port 0 tells the OS to use the default. When a connection cannot be created, raises the last error if *all_errors* is False, and an ExceptionGroup of all errors if *all_errors* is True. """ host, port = address exceptions = [] for res in getaddrinfo(host, port, 0, SOCK_STREAM): af, socktype, proto, canonname, sa = res sock = None try: sock = socket(af, socktype, proto) if timeout is not _GLOBAL_DEFAULT_TIMEOUT: sock.settimeout(timeout) if source_address: sock.bind(source_address) > sock.connect(sa) E ConnectionRefusedError: [Errno 111] Connection refused /usr/lib64/python3.12/socket.py:837: ConnectionRefusedError During handling of the above exception, another exception occurred: self = Engine(mysql+pymysql://root@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) /usr/lib/python3.12/site-packages/pymysql/connections.py:358: in __init__ self.connect() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , sock = None def connect(self, sock=None): self._closed = False try: if sock is None: if self.unix_socket: sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.settimeout(self.connect_timeout) sock.connect(self.unix_socket) self.host_info = "Localhost via UNIX socket" self._secure = True if DEBUG: print("connected using unix_socket") else: kwargs = {} if self.bind_address is not None: kwargs["source_address"] = (self.bind_address, 0) while True: try: sock = socket.create_connection( (self.host, self.port), self.connect_timeout, **kwargs ) break except OSError as e: if e.errno == errno.EINTR: continue raise self.host_info = "socket %s:%d" % (self.host, self.port) if DEBUG: print("connected using socket") sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) sock.settimeout(None) self._sock = sock self._rfile = sock.makefile("rb") self._next_seq_id = 0 self._get_server_information() self._request_authentication() # Send "SET NAMES" query on init for: # - Ensure charaset (and collation) is set to the server. # - collation_id in handshake packet may be ignored. # - If collation is not specified, we don't know what is server's # default collation for the charset. For example, default collation # of utf8mb4 is: # - MySQL 5.7, MariaDB 10.x: utf8mb4_general_ci # - MySQL 8.0: utf8mb4_0900_ai_ci # # Reference: # - https://github.com/PyMySQL/PyMySQL/issues/1092 # - https://github.com/wagtail/wagtail/issues/9477 # - https://zenn.dev/methane/articles/2023-mysql-collation (Japanese) self.set_character_set(self.charset, self.collation) if self.sql_mode is not None: c = self.cursor() c.execute("SET sql_mode=%s", (self.sql_mode,)) c.close() if self.init_command is not None: c = self.cursor() c.execute(self.init_command) c.close() if self.autocommit_mode is not None: self.autocommit(self.autocommit_mode) except BaseException as e: self._rfile = None if sock is not None: try: sock.close() except: # noqa pass if isinstance(e, (OSError, IOError)): exc = err.OperationalError( CR.CR_CONN_HOST_ERROR, f"Can't connect to MySQL server on {self.host!r} ({e})", ) # Keep original exception and traceback to investigate error. exc.original_exception = e exc.traceback = traceback.format_exc() if DEBUG: print(exc.traceback) > raise exc E pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' ([Errno 111] Connection refused)") /usr/lib/python3.12/site-packages/pymysql/connections.py:711: OperationalError The above exception was the direct cause of the following exception: engine = Engine(mysql+pymysql://root@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) /usr/lib/python3.12/site-packages/pymysql/connections.py:358: in __init__ self.connect() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , sock = None def connect(self, sock=None): self._closed = False try: if sock is None: if self.unix_socket: sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.settimeout(self.connect_timeout) sock.connect(self.unix_socket) self.host_info = "Localhost via UNIX socket" self._secure = True if DEBUG: print("connected using unix_socket") else: kwargs = {} if self.bind_address is not None: kwargs["source_address"] = (self.bind_address, 0) while True: try: sock = socket.create_connection( (self.host, self.port), self.connect_timeout, **kwargs ) break except OSError as e: if e.errno == errno.EINTR: continue raise self.host_info = "socket %s:%d" % (self.host, self.port) if DEBUG: print("connected using socket") sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) sock.settimeout(None) self._sock = sock self._rfile = sock.makefile("rb") self._next_seq_id = 0 self._get_server_information() self._request_authentication() # Send "SET NAMES" query on init for: # - Ensure charaset (and collation) is set to the server. # - collation_id in handshake packet may be ignored. # - If collation is not specified, we don't know what is server's # default collation for the charset. For example, default collation # of utf8mb4 is: # - MySQL 5.7, MariaDB 10.x: utf8mb4_general_ci # - MySQL 8.0: utf8mb4_0900_ai_ci # # Reference: # - https://github.com/PyMySQL/PyMySQL/issues/1092 # - https://github.com/wagtail/wagtail/issues/9477 # - https://zenn.dev/methane/articles/2023-mysql-collation (Japanese) self.set_character_set(self.charset, self.collation) if self.sql_mode is not None: c = self.cursor() c.execute("SET sql_mode=%s", (self.sql_mode,)) c.close() if self.init_command is not None: c = self.cursor() c.execute(self.init_command) c.close() if self.autocommit_mode is not None: self.autocommit(self.autocommit_mode) except BaseException as e: self._rfile = None if sock is not None: try: sock.close() except: # noqa pass if isinstance(e, (OSError, IOError)): exc = err.OperationalError( CR.CR_CONN_HOST_ERROR, f"Can't connect to MySQL server on {self.host!r} ({e})", ) # Keep original exception and traceback to investigate error. exc.original_exception = e exc.traceback = traceback.format_exc() if DEBUG: print(exc.traceback) > raise exc E sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'localhost' ([Errno 111] Connection refused)") E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib/python3.12/site-packages/pymysql/connections.py:711: OperationalError _ ERROR at setup of TestLazyEvaluatedSelectExpressionsForAggregates.test_assigns_aggregates_on_insert _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestLazyEvaluatedSelectExpressionsForAggregates.test_assigns_aggregates_on_update _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestLazyEvaluatedSelectExpressionsForAggregates.test_assigns_aggregates_on_insert[simple] _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestLazyEvaluatedSelectExpressionsForAggregates.test_assigns_aggregates_on_insert[child] _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestLazyEvaluatedSelectExpressionsForAggregates.test_assigns_aggregates_on_update[simple] _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestLazyEvaluatedSelectExpressionsForAggregates.test_assigns_aggregates_on_update[child] _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestAggregatesWithManyToManyRelationships.test_assigns_aggregates_on_insert _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestAggregatesWithManyToManyRelationships.test_updates_aggregates_on_delete _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of TestAggregateManyToManyAndManyToMany.test_insert ______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of TestAggregateOneToManyAndManyToMany.test_insert _______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestAggregateOneToManyAndOneToMany.test_assigns_aggregates _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of Test3LevelDeepOneToMany.test_assigns_aggregates _______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of Test3LevelDeepOneToMany.test_only_updates_affected_aggregates _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestSearchVectorAggregates.test_assigns_aggregates_on_insert _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestAggregateValueGenerationWithCascadeDelete.test_something _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of TestJSONSQL.test_compiled_scalars[1-1] ___________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of TestJSONSQL.test_compiled_scalars[14.14-14.14] _______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of TestJSONSQL.test_compiled_scalars[value2-result2] ______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of TestJSONSQL.test_compiled_scalars[value3-result3] ______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of TestJSONSQL.test_compiled_scalars[value4-result4] ______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of TestJSONSQL.test_compiled_scalars[value5-result5] ______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of TestJSONSQL.test_compiled_scalars[value6-result6] ______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of TestJSONSQL.test_compiled_scalars[value7-result7] ______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of TestJSONBSQL.test_compiled_scalars[1-1] ___________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______ ERROR at setup of TestJSONBSQL.test_compiled_scalars[14.14-14.14] _______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of TestJSONBSQL.test_compiled_scalars[value2-result2] _____ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of TestJSONBSQL.test_compiled_scalars[value3-result3] _____ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of TestJSONBSQL.test_compiled_scalars[value4-result4] _____ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of TestJSONBSQL.test_compiled_scalars[value5-result5] _____ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of TestJSONBSQL.test_compiled_scalars[value6-result6] _____ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of TestJSONBSQL.test_compiled_scalars[value7-result7] _____ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __________ ERROR at setup of TestObservesForColumn.test_simple_insert __________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesForColumnWithoutActualChanges.test_only_notifies_observer_on_actual_changes _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesForMultipleColumns.test_only_notifies_observer_on_actual_changes _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesForMultipleColumnsFiresOnlyOnce.test_only_notifies_observer_on_actual_changes _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesForDynamicRelationship.test_add_observed_object _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesForDynamicRelationship.test_add_observed_object_from_backref _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of TestObservesForManyToManyToManyToMany.test_simple_insert __ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesForManyToManyToManyToMany.test_add_leaf_object _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesForManyToManyToManyToMany.test_remove_leaf_object _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesForManyToManyToManyToMany.test_delete_intermediate_object _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesForManyToManyToManyToMany.test_gathered_objects_are_distinct _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of TestObservesFor3LevelDeepOneToMany.test_simple_insert ____ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of TestObservesFor3LevelDeepOneToMany.test_add_leaf_object ___ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesFor3LevelDeepOneToMany.test_remove_leaf_object _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesFor3LevelDeepOneToMany.test_delete_intermediate_object _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesFor3LevelDeepOneToMany.test_gathered_objects_are_distinct _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of TestObservesForOneToManyToOneToMany.test_simple_insert ___ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of TestObservesForOneToManyToOneToMany.test_add_leaf_object __ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesForOneToManyToOneToMany.test_remove_leaf_object _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesForOneToManyToOneToMany.test_delete_intermediate_object _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesForOneToManyToOneToMany.test_gathered_objects_are_distinct _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesForOneToManyToOneToMany.test_observable_root_obj_is_none _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____ ERROR at setup of TestObservesForOneToOneToOneToOne.test_simple_insert ____ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesForOneToOneToOneToOne.test_replace_leaf_object _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestObservesForOneToOneToOneToOne.test_delete_leaf_object __ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestSelectCorrelatedExpression.test_returns_correct_results[categories-categories-subcategories-result0] _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestSelectCorrelatedExpression.test_returns_correct_results[articles-comments-comments-result1] _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestSelectCorrelatedExpression.test_returns_correct_results[users-groups-groups-result2] _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestSelectCorrelatedExpression.test_returns_correct_results[users-users-all_friends-result3] _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestSelectCorrelatedExpression.test_returns_correct_results[users-users-all_friends.all_friends-result4] _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestSelectCorrelatedExpression.test_returns_correct_results[users-users-groups.users-result5] _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestSelectCorrelatedExpression.test_returns_correct_results[groups-articles-users.authored_articles-result6] _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestSelectCorrelatedExpression.test_returns_correct_results[categories-categories-subcategories.subcategories-result7] _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestSelectCorrelatedExpression.test_returns_correct_results[categories-categories-subcategories.subcategories.subcategories-result8] _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestSelectCorrelatedExpression.test_order_by_intermediate_table_column _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestSelectCorrelatedExpression.test_with_non_aggregate_function _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestCompositeTypeWithRegularTypes.test_parameter_processing _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of TestCompositeTypeWithRegularTypes.test_non_ascii_chars ___ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____ ERROR at setup of TestCompositeTypeWithRegularTypes.test_dict_input ______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___ ERROR at setup of TestCompositeTypeWithRegularTypes.test_incomplete_dict ___ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ ERROR at setup of TestCompositeTypeWhenTypeAlreadyExistsInDatabase.test_parameter_processing _ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError __ ERROR at setup of TestCompositeTypeWithMixedCase.test_parameter_processing __ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______________ ERROR at setup of TestPostgresJSONType.test_list _______________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______ ERROR at setup of TestPostgresJSONType.test_parameter_processing _______ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of TestPostgresJSONType.test_non_ascii_chars __________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of TestPostgresJSONType.test_compilation ____________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of TestPostgresJSONType.test_unhashable_type __________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________________ ERROR at setup of TestLTREE.test_saves_path __________________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ________________ ERROR at setup of TestLTREE.test_literal_param ________________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________________ ERROR at setup of TestLTREE.test_compilation _________________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _____________ ERROR at setup of TestTSVector.test_type_reflection ______________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _________ ERROR at setup of TestTSVector.test_catalog_passed_to_match __________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ___________ ERROR at setup of TestTSVector.test_match_concatenation ____________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ____________ ERROR at setup of TestTSVector.test_match_with_catalog ____________ self = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: engine = Engine(postgresql://postgres:***@localhost/sqlalchemy_utils_test) @pytest.fixture def connection(engine): > return engine.connect() conftest.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=sqlalchemy_utils_test' connection_factory = None, cursor_factory = None kwargs = {'database': 'sqlalchemy_utils_test', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError =================================== FAILURES =================================== ____________________ TestDatabaseMySQL.test_create_and_drop ____________________ self = , sock = None def connect(self, sock=None): self._closed = False try: if sock is None: if self.unix_socket: sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.settimeout(self.connect_timeout) sock.connect(self.unix_socket) self.host_info = "Localhost via UNIX socket" self._secure = True if DEBUG: print("connected using unix_socket") else: kwargs = {} if self.bind_address is not None: kwargs["source_address"] = (self.bind_address, 0) while True: try: > sock = socket.create_connection( (self.host, self.port), self.connect_timeout, **kwargs ) /usr/lib/python3.12/site-packages/pymysql/connections.py:644: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/socket.py:852: in create_connection raise exceptions[0] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ address = ('localhost', 3306), timeout = 10, source_address = None def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, source_address=None, *, all_errors=False): """Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. A host of '' or port 0 tells the OS to use the default. When a connection cannot be created, raises the last error if *all_errors* is False, and an ExceptionGroup of all errors if *all_errors* is True. """ host, port = address exceptions = [] for res in getaddrinfo(host, port, 0, SOCK_STREAM): af, socktype, proto, canonname, sa = res sock = None try: sock = socket(af, socktype, proto) if timeout is not _GLOBAL_DEFAULT_TIMEOUT: sock.settimeout(timeout) if source_address: sock.bind(source_address) > sock.connect(sa) E ConnectionRefusedError: [Errno 111] Connection refused /usr/lib64/python3.12/socket.py:837: ConnectionRefusedError During handling of the above exception, another exception occurred: self = Engine(mysql+pymysql://root@localhost) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) /usr/lib/python3.12/site-packages/pymysql/connections.py:358: in __init__ self.connect() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , sock = None def connect(self, sock=None): self._closed = False try: if sock is None: if self.unix_socket: sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.settimeout(self.connect_timeout) sock.connect(self.unix_socket) self.host_info = "Localhost via UNIX socket" self._secure = True if DEBUG: print("connected using unix_socket") else: kwargs = {} if self.bind_address is not None: kwargs["source_address"] = (self.bind_address, 0) while True: try: sock = socket.create_connection( (self.host, self.port), self.connect_timeout, **kwargs ) break except OSError as e: if e.errno == errno.EINTR: continue raise self.host_info = "socket %s:%d" % (self.host, self.port) if DEBUG: print("connected using socket") sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) sock.settimeout(None) self._sock = sock self._rfile = sock.makefile("rb") self._next_seq_id = 0 self._get_server_information() self._request_authentication() # Send "SET NAMES" query on init for: # - Ensure charaset (and collation) is set to the server. # - collation_id in handshake packet may be ignored. # - If collation is not specified, we don't know what is server's # default collation for the charset. For example, default collation # of utf8mb4 is: # - MySQL 5.7, MariaDB 10.x: utf8mb4_general_ci # - MySQL 8.0: utf8mb4_0900_ai_ci # # Reference: # - https://github.com/PyMySQL/PyMySQL/issues/1092 # - https://github.com/wagtail/wagtail/issues/9477 # - https://zenn.dev/methane/articles/2023-mysql-collation (Japanese) self.set_character_set(self.charset, self.collation) if self.sql_mode is not None: c = self.cursor() c.execute("SET sql_mode=%s", (self.sql_mode,)) c.close() if self.init_command is not None: c = self.cursor() c.execute(self.init_command) c.close() if self.autocommit_mode is not None: self.autocommit(self.autocommit_mode) except BaseException as e: self._rfile = None if sock is not None: try: sock.close() except: # noqa pass if isinstance(e, (OSError, IOError)): exc = err.OperationalError( CR.CR_CONN_HOST_ERROR, f"Can't connect to MySQL server on {self.host!r} ({e})", ) # Keep original exception and traceback to investigate error. exc.original_exception = e exc.traceback = traceback.format_exc() if DEBUG: print(exc.traceback) > raise exc E pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' ([Errno 111] Connection refused)") /usr/lib/python3.12/site-packages/pymysql/connections.py:711: OperationalError The above exception was the direct cause of the following exception: self = dsn = 'mysql+pymysql://root@localhost/db_test_sqlalchemy_util' def test_create_and_drop(self, dsn): > assert not database_exists(dsn) tests/functions/test_database.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sqlalchemy_utils/functions/database.py:498: in database_exists return bool(_get_scalar_result(engine, sa.text(text))) sqlalchemy_utils/functions/database.py:442: in _get_scalar_result with engine.connect() as conn: /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) /usr/lib/python3.12/site-packages/pymysql/connections.py:358: in __init__ self.connect() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , sock = None def connect(self, sock=None): self._closed = False try: if sock is None: if self.unix_socket: sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.settimeout(self.connect_timeout) sock.connect(self.unix_socket) self.host_info = "Localhost via UNIX socket" self._secure = True if DEBUG: print("connected using unix_socket") else: kwargs = {} if self.bind_address is not None: kwargs["source_address"] = (self.bind_address, 0) while True: try: sock = socket.create_connection( (self.host, self.port), self.connect_timeout, **kwargs ) break except OSError as e: if e.errno == errno.EINTR: continue raise self.host_info = "socket %s:%d" % (self.host, self.port) if DEBUG: print("connected using socket") sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) sock.settimeout(None) self._sock = sock self._rfile = sock.makefile("rb") self._next_seq_id = 0 self._get_server_information() self._request_authentication() # Send "SET NAMES" query on init for: # - Ensure charaset (and collation) is set to the server. # - collation_id in handshake packet may be ignored. # - If collation is not specified, we don't know what is server's # default collation for the charset. For example, default collation # of utf8mb4 is: # - MySQL 5.7, MariaDB 10.x: utf8mb4_general_ci # - MySQL 8.0: utf8mb4_0900_ai_ci # # Reference: # - https://github.com/PyMySQL/PyMySQL/issues/1092 # - https://github.com/wagtail/wagtail/issues/9477 # - https://zenn.dev/methane/articles/2023-mysql-collation (Japanese) self.set_character_set(self.charset, self.collation) if self.sql_mode is not None: c = self.cursor() c.execute("SET sql_mode=%s", (self.sql_mode,)) c.close() if self.init_command is not None: c = self.cursor() c.execute(self.init_command) c.close() if self.autocommit_mode is not None: self.autocommit(self.autocommit_mode) except BaseException as e: self._rfile = None if sock is not None: try: sock.close() except: # noqa pass if isinstance(e, (OSError, IOError)): exc = err.OperationalError( CR.CR_CONN_HOST_ERROR, f"Can't connect to MySQL server on {self.host!r} ({e})", ) # Keep original exception and traceback to investigate error. exc.original_exception = e exc.traceback = traceback.format_exc() if DEBUG: print(exc.traceback) > raise exc E sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'localhost' ([Errno 111] Connection refused)") E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib/python3.12/site-packages/pymysql/connections.py:711: OperationalError _____________ TestDatabaseMySQLWithQuotedName.test_create_and_drop _____________ self = , sock = None def connect(self, sock=None): self._closed = False try: if sock is None: if self.unix_socket: sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.settimeout(self.connect_timeout) sock.connect(self.unix_socket) self.host_info = "Localhost via UNIX socket" self._secure = True if DEBUG: print("connected using unix_socket") else: kwargs = {} if self.bind_address is not None: kwargs["source_address"] = (self.bind_address, 0) while True: try: > sock = socket.create_connection( (self.host, self.port), self.connect_timeout, **kwargs ) /usr/lib/python3.12/site-packages/pymysql/connections.py:644: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/socket.py:852: in create_connection raise exceptions[0] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ address = ('localhost', 3306), timeout = 10, source_address = None def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, source_address=None, *, all_errors=False): """Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. A host of '' or port 0 tells the OS to use the default. When a connection cannot be created, raises the last error if *all_errors* is False, and an ExceptionGroup of all errors if *all_errors* is True. """ host, port = address exceptions = [] for res in getaddrinfo(host, port, 0, SOCK_STREAM): af, socktype, proto, canonname, sa = res sock = None try: sock = socket(af, socktype, proto) if timeout is not _GLOBAL_DEFAULT_TIMEOUT: sock.settimeout(timeout) if source_address: sock.bind(source_address) > sock.connect(sa) E ConnectionRefusedError: [Errno 111] Connection refused /usr/lib64/python3.12/socket.py:837: ConnectionRefusedError During handling of the above exception, another exception occurred: self = Engine(mysql+pymysql://root@localhost) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) /usr/lib/python3.12/site-packages/pymysql/connections.py:358: in __init__ self.connect() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , sock = None def connect(self, sock=None): self._closed = False try: if sock is None: if self.unix_socket: sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.settimeout(self.connect_timeout) sock.connect(self.unix_socket) self.host_info = "Localhost via UNIX socket" self._secure = True if DEBUG: print("connected using unix_socket") else: kwargs = {} if self.bind_address is not None: kwargs["source_address"] = (self.bind_address, 0) while True: try: sock = socket.create_connection( (self.host, self.port), self.connect_timeout, **kwargs ) break except OSError as e: if e.errno == errno.EINTR: continue raise self.host_info = "socket %s:%d" % (self.host, self.port) if DEBUG: print("connected using socket") sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) sock.settimeout(None) self._sock = sock self._rfile = sock.makefile("rb") self._next_seq_id = 0 self._get_server_information() self._request_authentication() # Send "SET NAMES" query on init for: # - Ensure charaset (and collation) is set to the server. # - collation_id in handshake packet may be ignored. # - If collation is not specified, we don't know what is server's # default collation for the charset. For example, default collation # of utf8mb4 is: # - MySQL 5.7, MariaDB 10.x: utf8mb4_general_ci # - MySQL 8.0: utf8mb4_0900_ai_ci # # Reference: # - https://github.com/PyMySQL/PyMySQL/issues/1092 # - https://github.com/wagtail/wagtail/issues/9477 # - https://zenn.dev/methane/articles/2023-mysql-collation (Japanese) self.set_character_set(self.charset, self.collation) if self.sql_mode is not None: c = self.cursor() c.execute("SET sql_mode=%s", (self.sql_mode,)) c.close() if self.init_command is not None: c = self.cursor() c.execute(self.init_command) c.close() if self.autocommit_mode is not None: self.autocommit(self.autocommit_mode) except BaseException as e: self._rfile = None if sock is not None: try: sock.close() except: # noqa pass if isinstance(e, (OSError, IOError)): exc = err.OperationalError( CR.CR_CONN_HOST_ERROR, f"Can't connect to MySQL server on {self.host!r} ({e})", ) # Keep original exception and traceback to investigate error. exc.original_exception = e exc.traceback = traceback.format_exc() if DEBUG: print(exc.traceback) > raise exc E pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' ([Errno 111] Connection refused)") /usr/lib/python3.12/site-packages/pymysql/connections.py:711: OperationalError The above exception was the direct cause of the following exception: self = dsn = 'mysql+pymysql://root@localhost/db_test_sqlalchemy-util' def test_create_and_drop(self, dsn): > assert not database_exists(dsn) tests/functions/test_database.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sqlalchemy_utils/functions/database.py:498: in database_exists return bool(_get_scalar_result(engine, sa.text(text))) sqlalchemy_utils/functions/database.py:442: in _get_scalar_result with engine.connect() as conn: /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) /usr/lib/python3.12/site-packages/pymysql/connections.py:358: in __init__ self.connect() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , sock = None def connect(self, sock=None): self._closed = False try: if sock is None: if self.unix_socket: sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.settimeout(self.connect_timeout) sock.connect(self.unix_socket) self.host_info = "Localhost via UNIX socket" self._secure = True if DEBUG: print("connected using unix_socket") else: kwargs = {} if self.bind_address is not None: kwargs["source_address"] = (self.bind_address, 0) while True: try: sock = socket.create_connection( (self.host, self.port), self.connect_timeout, **kwargs ) break except OSError as e: if e.errno == errno.EINTR: continue raise self.host_info = "socket %s:%d" % (self.host, self.port) if DEBUG: print("connected using socket") sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) sock.settimeout(None) self._sock = sock self._rfile = sock.makefile("rb") self._next_seq_id = 0 self._get_server_information() self._request_authentication() # Send "SET NAMES" query on init for: # - Ensure charaset (and collation) is set to the server. # - collation_id in handshake packet may be ignored. # - If collation is not specified, we don't know what is server's # default collation for the charset. For example, default collation # of utf8mb4 is: # - MySQL 5.7, MariaDB 10.x: utf8mb4_general_ci # - MySQL 8.0: utf8mb4_0900_ai_ci # # Reference: # - https://github.com/PyMySQL/PyMySQL/issues/1092 # - https://github.com/wagtail/wagtail/issues/9477 # - https://zenn.dev/methane/articles/2023-mysql-collation (Japanese) self.set_character_set(self.charset, self.collation) if self.sql_mode is not None: c = self.cursor() c.execute("SET sql_mode=%s", (self.sql_mode,)) c.close() if self.init_command is not None: c = self.cursor() c.execute(self.init_command) c.close() if self.autocommit_mode is not None: self.autocommit(self.autocommit_mode) except BaseException as e: self._rfile = None if sock is not None: try: sock.close() except: # noqa pass if isinstance(e, (OSError, IOError)): exc = err.OperationalError( CR.CR_CONN_HOST_ERROR, f"Can't connect to MySQL server on {self.host!r} ({e})", ) # Keep original exception and traceback to investigate error. exc.original_exception = e exc.traceback = traceback.format_exc() if DEBUG: print(exc.traceback) > raise exc E sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'localhost' ([Errno 111] Connection refused)") E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib/python3.12/site-packages/pymysql/connections.py:711: OperationalError __________________ TestDatabasePostgres.test_create_and_drop ___________________ self = Engine(postgresql://postgres:***@localhost/postgres) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=postgres', connection_factory = None cursor_factory = None kwargs = {'database': 'postgres', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = dsn = 'postgresql://postgres:@localhost/db_test_sqlalchemy_util' def test_create_and_drop(self, dsn): assert not database_exists(dsn) > create_database(dsn) tests/functions/test_database.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sqlalchemy_utils/functions/database.py:568: in create_database with engine.begin() as conn: /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3153: in begin conn = self.connect(close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=postgres', connection_factory = None cursor_factory = None kwargs = {'database': 'postgres', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError ______________________ TestDatabasePostgres.test_template ______________________ self = Engine(postgresql://postgres:***@localhost/postgres) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=postgres', connection_factory = None cursor_factory = None kwargs = {'database': 'postgres', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = postgresql_db_user = 'postgres', postgresql_db_password = '' def test_template(self, postgresql_db_user, postgresql_db_password): dsn = 'postgresql://{}:{}@localhost/db_test_sqlalchemy_util'.format( postgresql_db_user, postgresql_db_password ) with pytest.raises(sa.exc.ProgrammingError) as excinfo: > create_database(dsn, template='my_template') tests/functions/test_database.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sqlalchemy_utils/functions/database.py:568: in create_database with engine.begin() as conn: /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3153: in begin conn = self.connect(close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=postgres', connection_factory = None cursor_factory = None kwargs = {'database': 'postgres', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______________ TestDatabasePostgresPg8000.test_create_and_drop ________________ unix_sock = None, sock = None, host = 'localhost', port = 5432, timeout = None source_address = None, tcp_keepalive = True, ssl_context = None def _make_socket( unix_sock, sock, host, port, timeout, source_address, tcp_keepalive, ssl_context ): if unix_sock is not None: if sock is not None: raise InterfaceError("If unix_sock is provided, sock must be None") try: if not hasattr(socket, "AF_UNIX"): raise InterfaceError( "attempt to connect to unix socket on unsupported platform" ) sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.settimeout(timeout) sock.connect(unix_sock) if tcp_keepalive: sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) except socket.error as e: if sock is not None: sock.close() raise InterfaceError("communication error") from e elif sock is not None: pass elif host is not None: try: > sock = socket.create_connection((host, port), timeout, source_address) /usr/lib/python3.12/site-packages/pg8000/core.py:199: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/socket.py:852: in create_connection raise exceptions[0] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ address = ('localhost', 5432), timeout = None, source_address = None def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, source_address=None, *, all_errors=False): """Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. A host of '' or port 0 tells the OS to use the default. When a connection cannot be created, raises the last error if *all_errors* is False, and an ExceptionGroup of all errors if *all_errors* is True. """ host, port = address exceptions = [] for res in getaddrinfo(host, port, 0, SOCK_STREAM): af, socktype, proto, canonname, sa = res sock = None try: sock = socket(af, socktype, proto) if timeout is not _GLOBAL_DEFAULT_TIMEOUT: sock.settimeout(timeout) if source_address: sock.bind(source_address) > sock.connect(sa) E ConnectionRefusedError: [Errno 111] Connection refused /usr/lib64/python3.12/socket.py:837: ConnectionRefusedError The above exception was the direct cause of the following exception: self = Engine(postgresql+pg8000://postgres:***@localhost/db_to_test_create_and_drop_via_pg8000_driver) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) /usr/lib/python3.12/site-packages/pg8000/__init__.py:111: in connect return Connection( /usr/lib/python3.12/site-packages/pg8000/legacy.py:443: in __init__ super().__init__(*args, **kwargs) /usr/lib/python3.12/site-packages/pg8000/core.py:312: in __init__ self.channel_binding, self._usock = _make_socket( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ unix_sock = None, sock = None, host = 'localhost', port = 5432, timeout = None source_address = None, tcp_keepalive = True, ssl_context = None def _make_socket( unix_sock, sock, host, port, timeout, source_address, tcp_keepalive, ssl_context ): if unix_sock is not None: if sock is not None: raise InterfaceError("If unix_sock is provided, sock must be None") try: if not hasattr(socket, "AF_UNIX"): raise InterfaceError( "attempt to connect to unix socket on unsupported platform" ) sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.settimeout(timeout) sock.connect(unix_sock) if tcp_keepalive: sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) except socket.error as e: if sock is not None: sock.close() raise InterfaceError("communication error") from e elif sock is not None: pass elif host is not None: try: sock = socket.create_connection((host, port), timeout, source_address) except socket.error as e: > raise InterfaceError( f"Can't create a connection to host {host} and port {port} " f"(timeout is {timeout} and source_address is {source_address})." ) from e E pg8000.exceptions.InterfaceError: Can't create a connection to host localhost and port 5432 (timeout is None and source_address is None). /usr/lib/python3.12/site-packages/pg8000/core.py:201: InterfaceError The above exception was the direct cause of the following exception: self = dsn = 'postgresql+pg8000://postgres:@localhost/db_to_test_create_and_drop_via_pg8000_driver' def test_create_and_drop(self, dsn): > assert not database_exists(dsn) tests/functions/test_database.py:18: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sqlalchemy_utils/functions/database.py:488: in database_exists return bool(_get_scalar_result(engine, sa.text(text))) sqlalchemy_utils/functions/database.py:442: in _get_scalar_result with engine.connect() as conn: /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) /usr/lib/python3.12/site-packages/pg8000/__init__.py:111: in connect return Connection( /usr/lib/python3.12/site-packages/pg8000/legacy.py:443: in __init__ super().__init__(*args, **kwargs) /usr/lib/python3.12/site-packages/pg8000/core.py:312: in __init__ self.channel_binding, self._usock = _make_socket( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ unix_sock = None, sock = None, host = 'localhost', port = 5432, timeout = None source_address = None, tcp_keepalive = True, ssl_context = None def _make_socket( unix_sock, sock, host, port, timeout, source_address, tcp_keepalive, ssl_context ): if unix_sock is not None: if sock is not None: raise InterfaceError("If unix_sock is provided, sock must be None") try: if not hasattr(socket, "AF_UNIX"): raise InterfaceError( "attempt to connect to unix socket on unsupported platform" ) sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.settimeout(timeout) sock.connect(unix_sock) if tcp_keepalive: sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1) except socket.error as e: if sock is not None: sock.close() raise InterfaceError("communication error") from e elif sock is not None: pass elif host is not None: try: sock = socket.create_connection((host, port), timeout, source_address) except socket.error as e: > raise InterfaceError( f"Can't create a connection to host {host} and port {port} " f"(timeout is {timeout} and source_address is {source_address})." ) from e E sqlalchemy.exc.InterfaceError: (pg8000.exceptions.InterfaceError) Can't create a connection to host localhost and port 5432 (timeout is None and source_address is None). E (Background on this error at: https://sqlalche.me/e/14/rvf5) /usr/lib/python3.12/site-packages/pg8000/core.py:201: InterfaceError ___________ TestDatabasePostgresWithQuotedName.test_create_and_drop ____________ self = Engine(postgresql://postgres:***@localhost/postgres) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=postgres', connection_factory = None cursor_factory = None kwargs = {'database': 'postgres', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = dsn = 'postgresql://postgres:@localhost/db_test_sqlalchemy-util' def test_create_and_drop(self, dsn): assert not database_exists(dsn) > create_database(dsn) tests/functions/test_database.py:19: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sqlalchemy_utils/functions/database.py:568: in create_database with engine.begin() as conn: /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3153: in begin conn = self.connect(close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=postgres', connection_factory = None cursor_factory = None kwargs = {'database': 'postgres', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _______________ TestDatabasePostgresWithQuotedName.test_template _______________ self = Engine(postgresql://postgres:***@localhost/postgres) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=postgres', connection_factory = None cursor_factory = None kwargs = {'database': 'postgres', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = postgresql_db_user = 'postgres', postgresql_db_password = '' def test_template(self, postgresql_db_user, postgresql_db_password): dsn = 'postgresql://{}:{}@localhost/db_test_sqlalchemy-util'.format( postgresql_db_user, postgresql_db_password ) with pytest.raises(sa.exc.ProgrammingError) as excinfo: > create_database(dsn, template='my-template') tests/functions/test_database.py:130: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sqlalchemy_utils/functions/database.py:568: in create_database with engine.begin() as conn: /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3153: in begin conn = self.connect(close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=postgres', connection_factory = None cursor_factory = None kwargs = {'database': 'postgres', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError _ TestDatabasePostgresCreateDatabaseCloseConnection.test_create_database_twice _ self = Engine(postgresql://postgres:***@localhost/postgres) fn = > connection = None def _wrap_pool_connect(self, fn, connection): dialect = self.dialect try: > return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=postgres', connection_factory = None cursor_factory = None kwargs = {'database': 'postgres', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError The above exception was the direct cause of the following exception: self = postgresql_db_user = 'postgres', postgresql_db_password = '' def test_create_database_twice( self, postgresql_db_user, postgresql_db_password ): dsn_list = [ 'postgresql://{}:{}@localhost/db_test_sqlalchemy-util-a'.format( postgresql_db_user, postgresql_db_password ), 'postgresql://{}:{}@localhost/db_test_sqlalchemy-util-b'.format( postgresql_db_user, postgresql_db_password ), ] for dsn_item in dsn_list: assert not database_exists(dsn_item) > create_database(dsn_item, template="template1") tests/functions/test_database.py:153: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ sqlalchemy_utils/functions/database.py:568: in create_database with engine.begin() as conn: /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3153: in begin conn = self.connect(close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3325: in connect return self._connection_cls(self, close_with_result=close_with_result) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:96: in __init__ else engine.raw_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3404: in raw_connection return self._wrap_pool_connect(self.pool.connect, _connection) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3374: in _wrap_pool_connect Connection._handle_dbapi_exception_noconnection( /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:2208: in _handle_dbapi_exception_noconnection util.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/engine/base.py:3371: in _wrap_pool_connect return fn() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:327: in connect return _ConnectionFairy._checkout(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:894: in _checkout fairy = _ConnectionRecord.checkout(pool) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:493: in checkout rec = pool._do_get() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:145: in _do_get with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/impl.py:143: in _do_get return self._create_connection() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:273: in _create_connection return _ConnectionRecord(self) /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:388: in __init__ self.__connect() /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:690: in __connect with util.safe_reraise(): /usr/lib64/python3.12/site-packages/sqlalchemy/util/langhelpers.py:70: in __exit__ compat.raise_( /usr/lib64/python3.12/site-packages/sqlalchemy/util/compat.py:211: in raise_ raise exception /usr/lib64/python3.12/site-packages/sqlalchemy/pool/base.py:686: in __connect self.dbapi_connection = connection = pool._invoke_creator(self) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/create.py:574: in connect return dialect.connect(*cargs, **cparams) /usr/lib64/python3.12/site-packages/sqlalchemy/engine/default.py:598: in connect return self.dbapi.connect(*cargs, **cparams) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dsn = 'host=localhost user=postgres dbname=postgres', connection_factory = None cursor_factory = None kwargs = {'database': 'postgres', 'host': 'localhost', 'user': 'postgres'} kwasync = {} def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs): """ Create a new database connection. The connection parameters can be specified as a string: conn = psycopg2.connect("dbname=test user=postgres password=secret") or using a set of keyword arguments: conn = psycopg2.connect(database="test", user="postgres", password="secret") Or as a mix of both. The basic connection parameters are: - *dbname*: the database name - *database*: the database name (only as keyword argument) - *user*: user name used to authenticate - *password*: password used to authenticate - *host*: database host address (defaults to UNIX socket if not provided) - *port*: connection port number (defaults to 5432 if not provided) Using the *connection_factory* parameter a different class or connections factory can be specified. It should be a callable object taking a dsn argument. Using the *cursor_factory* parameter, a new default cursor factory will be used by cursor(). Using *async*=True an asynchronous connection will be created. *async_* is a valid alias (for Python versions where ``async`` is a keyword). Any other keyword parameter will be passed to the underlying client library: the list of supported parameters depends on the library version. """ kwasync = {} if 'async' in kwargs: kwasync['async'] = kwargs.pop('async') if 'async_' in kwargs: kwasync['async_'] = kwargs.pop('async_') dsn = _ext.make_dsn(dsn, **kwargs) > conn = _connect(dsn, connection_factory=connection_factory, **kwasync) E sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused E Is the server running on that host and accepting TCP/IP connections? E E (Background on this error at: https://sqlalche.me/e/14/e3q8) /usr/lib64/python3.12/site-packages/psycopg2/__init__.py:122: OperationalError =============================== warnings summary =============================== tests/test_models.py::TestTimestamp::test_created /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/tests/test_models.py:20: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). then = datetime.utcnow() tests/test_models.py::TestTimestamp::test_created tests/test_models.py::TestTimestamp::test_created tests/test_models.py::TestTimestamp::test_updated tests/test_models.py::TestTimestamp::test_updated /usr/lib64/python3.12/site-packages/sqlalchemy/sql/schema.py:2783: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). return util.wrap_callable(lambda ctx: fn(), fn) tests/test_models.py::TestTimestamp::test_created /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/tests/test_models.py:26: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). assert article.created >= then and article.created <= datetime.utcnow() tests/test_models.py::TestTimestamp::test_updated /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/tests/test_models.py:34: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). then = datetime.utcnow() tests/test_models.py::TestTimestamp::test_updated /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/sqlalchemy_utils/models.py:33: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). target.updated = datetime.utcnow() tests/test_models.py::TestTimestamp::test_updated /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/tests/test_models.py:39: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). assert article.updated >= then and article.updated <= datetime.utcnow() -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/functions/test_database.py::TestDatabaseMySQL::test_create_and_drop FAILED tests/functions/test_database.py::TestDatabaseMySQLWithQuotedName::test_create_and_drop FAILED tests/functions/test_database.py::TestDatabasePostgres::test_create_and_drop FAILED tests/functions/test_database.py::TestDatabasePostgres::test_template FAILED tests/functions/test_database.py::TestDatabasePostgresPg8000::test_create_and_drop FAILED tests/functions/test_database.py::TestDatabasePostgresWithQuotedName::test_create_and_drop FAILED tests/functions/test_database.py::TestDatabasePostgresWithQuotedName::test_template FAILED tests/functions/test_database.py::TestDatabasePostgresCreateDatabaseCloseConnection::test_create_database_twice ERROR tests/test_asserts.py::TestAssertMaxLengthWithArray::test_with_max_length ERROR tests/test_asserts.py::TestAssertMaxLengthWithArray::test_smaller_than_max_length ERROR tests/test_asserts.py::TestAssertMaxLengthWithArray::test_bigger_than_max_length ERROR tests/test_asserts.py::TestAssertNonNullable::test_non_nullable_column ERROR tests/test_asserts.py::TestAssertNonNullable::test_nullable_column - sq... ERROR tests/test_asserts.py::TestAssertNullable::test_nullable_column - sqlal... ERROR tests/test_asserts.py::TestAssertNullable::test_non_nullable_column - s... ERROR tests/test_asserts.py::TestAssertMaxLength::test_with_max_length - sqla... ERROR tests/test_asserts.py::TestAssertMaxLength::test_with_non_nullable_column ERROR tests/test_asserts.py::TestAssertMaxLength::test_smaller_than_max_length ERROR tests/test_asserts.py::TestAssertMaxLength::test_bigger_than_max_length ERROR tests/test_asserts.py::TestAssertMinValue::test_with_min_value - sqlalc... ERROR tests/test_asserts.py::TestAssertMinValue::test_smaller_than_min_value ERROR tests/test_asserts.py::TestAssertMinValue::test_bigger_than_min_value ERROR tests/test_asserts.py::TestAssertMaxValue::test_with_min_value - sqlalc... ERROR tests/test_asserts.py::TestAssertMaxValue::test_smaller_than_max_value ERROR tests/test_asserts.py::TestAssertMaxValue::test_bigger_than_max_value ERROR tests/test_views.py::TestMaterializedViews::test_refresh_materialized_view ERROR tests/test_views.py::TestMaterializedViews::test_querying_view - sqlalc... ERROR tests/test_views.py::TestPostgresTrivialView::test_life_cycle_no_cascade ERROR tests/test_views.py::TestPostgresTrivialView::test_life_cycle_cascade ERROR tests/test_views.py::TestMySqlTrivialView::test_life_cycle_no_cascade ERROR tests/test_views.py::TestMySqlTrivialView::test_life_cycle_cascade - sq... ERROR tests/aggregate/test_custom_select_expressions.py::TestLazyEvaluatedSelectExpressionsForAggregates::test_assigns_aggregates_on_insert ERROR tests/aggregate/test_custom_select_expressions.py::TestLazyEvaluatedSelectExpressionsForAggregates::test_assigns_aggregates_on_update ERROR tests/aggregate/test_join_table_inheritance.py::TestLazyEvaluatedSelectExpressionsForAggregates::test_assigns_aggregates_on_insert[simple] ERROR tests/aggregate/test_join_table_inheritance.py::TestLazyEvaluatedSelectExpressionsForAggregates::test_assigns_aggregates_on_insert[child] ERROR tests/aggregate/test_join_table_inheritance.py::TestLazyEvaluatedSelectExpressionsForAggregates::test_assigns_aggregates_on_update[simple] ERROR tests/aggregate/test_join_table_inheritance.py::TestLazyEvaluatedSelectExpressionsForAggregates::test_assigns_aggregates_on_update[child] ERROR tests/aggregate/test_m2m.py::TestAggregatesWithManyToManyRelationships::test_assigns_aggregates_on_insert ERROR tests/aggregate/test_m2m.py::TestAggregatesWithManyToManyRelationships::test_updates_aggregates_on_delete ERROR tests/aggregate/test_m2m_m2m.py::TestAggregateManyToManyAndManyToMany::test_insert ERROR tests/aggregate/test_o2m_m2m.py::TestAggregateOneToManyAndManyToMany::test_insert ERROR tests/aggregate/test_o2m_o2m.py::TestAggregateOneToManyAndOneToMany::test_assigns_aggregates ERROR tests/aggregate/test_o2m_o2m_o2m.py::Test3LevelDeepOneToMany::test_assigns_aggregates ERROR tests/aggregate/test_o2m_o2m_o2m.py::Test3LevelDeepOneToMany::test_only_updates_affected_aggregates ERROR tests/aggregate/test_search_vectors.py::TestSearchVectorAggregates::test_assigns_aggregates_on_insert ERROR tests/aggregate/test_with_ondelete_cascade.py::TestAggregateValueGenerationWithCascadeDelete::test_something ERROR tests/functions/test_json_sql.py::TestJSONSQL::test_compiled_scalars[1-1] ERROR tests/functions/test_json_sql.py::TestJSONSQL::test_compiled_scalars[14.14-14.14] ERROR tests/functions/test_json_sql.py::TestJSONSQL::test_compiled_scalars[value2-result2] ERROR tests/functions/test_json_sql.py::TestJSONSQL::test_compiled_scalars[value3-result3] ERROR tests/functions/test_json_sql.py::TestJSONSQL::test_compiled_scalars[value4-result4] ERROR tests/functions/test_json_sql.py::TestJSONSQL::test_compiled_scalars[value5-result5] ERROR tests/functions/test_json_sql.py::TestJSONSQL::test_compiled_scalars[value6-result6] ERROR tests/functions/test_json_sql.py::TestJSONSQL::test_compiled_scalars[value7-result7] ERROR tests/functions/test_jsonb_sql.py::TestJSONBSQL::test_compiled_scalars[1-1] ERROR tests/functions/test_jsonb_sql.py::TestJSONBSQL::test_compiled_scalars[14.14-14.14] ERROR tests/functions/test_jsonb_sql.py::TestJSONBSQL::test_compiled_scalars[value2-result2] ERROR tests/functions/test_jsonb_sql.py::TestJSONBSQL::test_compiled_scalars[value3-result3] ERROR tests/functions/test_jsonb_sql.py::TestJSONBSQL::test_compiled_scalars[value4-result4] ERROR tests/functions/test_jsonb_sql.py::TestJSONBSQL::test_compiled_scalars[value5-result5] ERROR tests/functions/test_jsonb_sql.py::TestJSONBSQL::test_compiled_scalars[value6-result6] ERROR tests/functions/test_jsonb_sql.py::TestJSONBSQL::test_compiled_scalars[value7-result7] ERROR tests/observes/test_column_property.py::TestObservesForColumn::test_simple_insert ERROR tests/observes/test_column_property.py::TestObservesForColumnWithoutActualChanges::test_only_notifies_observer_on_actual_changes ERROR tests/observes/test_column_property.py::TestObservesForMultipleColumns::test_only_notifies_observer_on_actual_changes ERROR tests/observes/test_column_property.py::TestObservesForMultipleColumnsFiresOnlyOnce::test_only_notifies_observer_on_actual_changes ERROR tests/observes/test_dynamic_relationship.py::TestObservesForDynamicRelationship::test_add_observed_object ERROR tests/observes/test_dynamic_relationship.py::TestObservesForDynamicRelationship::test_add_observed_object_from_backref ERROR tests/observes/test_m2m_m2m_m2m.py::TestObservesForManyToManyToManyToMany::test_simple_insert ERROR tests/observes/test_m2m_m2m_m2m.py::TestObservesForManyToManyToManyToMany::test_add_leaf_object ERROR tests/observes/test_m2m_m2m_m2m.py::TestObservesForManyToManyToManyToMany::test_remove_leaf_object ERROR tests/observes/test_m2m_m2m_m2m.py::TestObservesForManyToManyToManyToMany::test_delete_intermediate_object ERROR tests/observes/test_m2m_m2m_m2m.py::TestObservesForManyToManyToManyToMany::test_gathered_objects_are_distinct ERROR tests/observes/test_o2m_o2m_o2m.py::TestObservesFor3LevelDeepOneToMany::test_simple_insert ERROR tests/observes/test_o2m_o2m_o2m.py::TestObservesFor3LevelDeepOneToMany::test_add_leaf_object ERROR tests/observes/test_o2m_o2m_o2m.py::TestObservesFor3LevelDeepOneToMany::test_remove_leaf_object ERROR tests/observes/test_o2m_o2m_o2m.py::TestObservesFor3LevelDeepOneToMany::test_delete_intermediate_object ERROR tests/observes/test_o2m_o2m_o2m.py::TestObservesFor3LevelDeepOneToMany::test_gathered_objects_are_distinct ERROR tests/observes/test_o2m_o2o_o2m.py::TestObservesForOneToManyToOneToMany::test_simple_insert ERROR tests/observes/test_o2m_o2o_o2m.py::TestObservesForOneToManyToOneToMany::test_add_leaf_object ERROR tests/observes/test_o2m_o2o_o2m.py::TestObservesForOneToManyToOneToMany::test_remove_leaf_object ERROR tests/observes/test_o2m_o2o_o2m.py::TestObservesForOneToManyToOneToMany::test_delete_intermediate_object ERROR tests/observes/test_o2m_o2o_o2m.py::TestObservesForOneToManyToOneToMany::test_gathered_objects_are_distinct ERROR tests/observes/test_o2o_o2o.py::TestObservesForOneToManyToOneToMany::test_observable_root_obj_is_none ERROR tests/observes/test_o2o_o2o_o2o.py::TestObservesForOneToOneToOneToOne::test_simple_insert ERROR tests/observes/test_o2o_o2o_o2o.py::TestObservesForOneToOneToOneToOne::test_replace_leaf_object ERROR tests/observes/test_o2o_o2o_o2o.py::TestObservesForOneToOneToOneToOne::test_delete_leaf_object ERROR tests/relationships/test_select_correlated_expression.py::TestSelectCorrelatedExpression::test_returns_correct_results[categories-categories-subcategories-result0] ERROR tests/relationships/test_select_correlated_expression.py::TestSelectCorrelatedExpression::test_returns_correct_results[articles-comments-comments-result1] ERROR tests/relationships/test_select_correlated_expression.py::TestSelectCorrelatedExpression::test_returns_correct_results[users-groups-groups-result2] ERROR tests/relationships/test_select_correlated_expression.py::TestSelectCorrelatedExpression::test_returns_correct_results[users-users-all_friends-result3] ERROR tests/relationships/test_select_correlated_expression.py::TestSelectCorrelatedExpression::test_returns_correct_results[users-users-all_friends.all_friends-result4] ERROR tests/relationships/test_select_correlated_expression.py::TestSelectCorrelatedExpression::test_returns_correct_results[users-users-groups.users-result5] ERROR tests/relationships/test_select_correlated_expression.py::TestSelectCorrelatedExpression::test_returns_correct_results[groups-articles-users.authored_articles-result6] ERROR tests/relationships/test_select_correlated_expression.py::TestSelectCorrelatedExpression::test_returns_correct_results[categories-categories-subcategories.subcategories-result7] ERROR tests/relationships/test_select_correlated_expression.py::TestSelectCorrelatedExpression::test_returns_correct_results[categories-categories-subcategories.subcategories.subcategories-result8] ERROR tests/relationships/test_select_correlated_expression.py::TestSelectCorrelatedExpression::test_order_by_intermediate_table_column ERROR tests/relationships/test_select_correlated_expression.py::TestSelectCorrelatedExpression::test_with_non_aggregate_function ERROR tests/types/test_composite.py::TestCompositeTypeWithRegularTypes::test_parameter_processing ERROR tests/types/test_composite.py::TestCompositeTypeWithRegularTypes::test_non_ascii_chars ERROR tests/types/test_composite.py::TestCompositeTypeWithRegularTypes::test_dict_input ERROR tests/types/test_composite.py::TestCompositeTypeWithRegularTypes::test_incomplete_dict ERROR tests/types/test_composite.py::TestCompositeTypeWhenTypeAlreadyExistsInDatabase::test_parameter_processing ERROR tests/types/test_composite.py::TestCompositeTypeWithMixedCase::test_parameter_processing ERROR tests/types/test_json.py::TestPostgresJSONType::test_list - sqlalchemy.... ERROR tests/types/test_json.py::TestPostgresJSONType::test_parameter_processing ERROR tests/types/test_json.py::TestPostgresJSONType::test_non_ascii_chars - ... ERROR tests/types/test_json.py::TestPostgresJSONType::test_compilation - sqla... ERROR tests/types/test_json.py::TestPostgresJSONType::test_unhashable_type - ... ERROR tests/types/test_ltree.py::TestLTREE::test_saves_path - sqlalchemy.exc.... ERROR tests/types/test_ltree.py::TestLTREE::test_literal_param - sqlalchemy.e... ERROR tests/types/test_ltree.py::TestLTREE::test_compilation - sqlalchemy.exc... ERROR tests/types/test_tsvector.py::TestTSVector::test_type_reflection - sqla... ERROR tests/types/test_tsvector.py::TestTSVector::test_catalog_passed_to_match ERROR tests/types/test_tsvector.py::TestTSVector::test_match_concatenation - ... ERROR tests/types/test_tsvector.py::TestTSVector::test_match_with_catalog - s... = 8 failed, 2216 passed, 351 skipped, 1 xfailed, 9 warnings, 108 errors in 887.31s (0:14:47) = + : + RPM_EC=0 ++ jobs -p + exit 0 Processing files: python3-sqlalchemy-utils-0.41.1-5.fc41.noarch Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.BY8p5v + umask 022 + cd /builddir/build/BUILD + cd SQLAlchemy-Utils-0.41.1 + DOCDIR=/builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/share/doc/python3-sqlalchemy-utils + export LC_ALL= + LC_ALL= + export DOCDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/share/doc/python3-sqlalchemy-utils + cp -pr /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/README.rst /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/share/doc/python3-sqlalchemy-utils + RPM_EC=0 ++ jobs -p + exit 0 Executing(%license): /bin/sh -e /var/tmp/rpm-tmp.RQnGa5 + umask 022 + cd /builddir/build/BUILD + cd SQLAlchemy-Utils-0.41.1 + LICENSEDIR=/builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/share/licenses/python3-sqlalchemy-utils + export LC_ALL= + LC_ALL= + export LICENSEDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/share/licenses/python3-sqlalchemy-utils + cp -pr /builddir/build/BUILD/SQLAlchemy-Utils-0.41.1/LICENSE /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch/usr/share/licenses/python3-sqlalchemy-utils + RPM_EC=0 ++ jobs -p + exit 0 Provides: python-sqlalchemy-utils = 0.41.1-5.fc41 python3-sqlalchemy-utils = 0.41.1-5.fc41 python3.12-sqlalchemy-utils = 0.41.1-5.fc41 python3.12dist(sqlalchemy-utils) = 0.41.1 python3dist(sqlalchemy-utils) = 0.41.1 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: (python3.12dist(sqlalchemy) < 2~~ with python3.12dist(sqlalchemy) >= 1.3) python(abi) = 3.12 Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/python-sqlalchemy-utils-0.41.1-5.fc41.noarch Wrote: /builddir/build/SRPMS/python-sqlalchemy-utils-0.41.1-5.fc41.src.rpm Wrote: /builddir/build/RPMS/python3-sqlalchemy-utils-0.41.1-5.fc41.noarch.rpm Child return code was: 0