Mock Version: 5.0 Mock Version: 5.0 Mock Version: 5.0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/python-dns.spec'], chrootPath='/var/lib/mock/f39-build-1847000-42128/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=982gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target noarch --nodeps /builddir/build/SPECS/python-dns.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1691625600 Wrote: /builddir/build/SRPMS/python-dns-2.4.2-1.fc39.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-dns.spec'], chrootPath='/var/lib/mock/f39-build-1847000-42128/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=982gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueraiseExc=FalseprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-dns.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1691625600 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.ouRoQw + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf dnspython-2.4.2 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/dnspython-2.4.2.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd dnspython-2.4.2 + rm -rf /builddir/build/BUILD/dnspython-2.4.2-SPECPARTS + /usr/bin/mkdir -p /builddir/build/BUILD/dnspython-2.4.2-SPECPARTS + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + find examples -type f + xargs chmod a-x + sed -i 's/cryptography = {version=">=2.6,<40.0"/cryptography = {version=">=2.6,<42.0"/' pyproject.toml + sed -i 's/requests-toolbelt = {version=">=0.9.1,<0.11.0"/requests-toolbelt = {version=">=0.9.1,<=1.0.0"/' pyproject.toml + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.hRO6hJ + umask 022 + cd /builddir/build/BUILD + cd dnspython-2.4.2 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.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-dns-2.4.2-1.fc39.noarch-pyproject-buildrequires -r -x dnssec -x idna -x trio -x doh Handling poetry-core from build-system.requires Requirement not satisfied: poetry-core Exiting dependency generation pass: build backend + cat /builddir/build/BUILD/python-dns-2.4.2-1.fc39.noarch-pyproject-buildrequires + rm -rfv '*.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-dns-2.4.2-1.fc39.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-dns.spec'], chrootPath='/var/lib/mock/f39-build-1847000-42128/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=982gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueraiseExc=FalseprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-dns.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1691625600 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.n9Ih40 + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf dnspython-2.4.2 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/dnspython-2.4.2.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd dnspython-2.4.2 + rm -rf /builddir/build/BUILD/dnspython-2.4.2-SPECPARTS + /usr/bin/mkdir -p /builddir/build/BUILD/dnspython-2.4.2-SPECPARTS + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + find examples -type f + xargs chmod a-x + sed -i 's/cryptography = {version=">=2.6,<40.0"/cryptography = {version=">=2.6,<42.0"/' pyproject.toml + sed -i 's/requests-toolbelt = {version=">=0.9.1,<0.11.0"/requests-toolbelt = {version=">=0.9.1,<=1.0.0"/' pyproject.toml + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.YadH47 + umask 022 + cd /builddir/build/BUILD + cd dnspython-2.4.2 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.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-dns-2.4.2-1.fc39.noarch-pyproject-buildrequires -r -x dnssec -x idna -x trio -x doh Handling poetry-core from build-system.requires Requirement satisfied: poetry-core (installed: poetry-core 1.6.1) Handling aioquic (>=0.9.20) ; extra == "doq" from hook generated metadata: Requires-Dist (dnspython) Ignoring alien requirement: aioquic (>=0.9.20) ; extra == "doq" Handling cryptography (>=2.6,<42.0) ; extra == "dnssec" from hook generated metadata: Requires-Dist (dnspython) Requirement not satisfied: cryptography (>=2.6,<42.0) ; extra == "dnssec" Handling h2 (>=4.1.0) ; extra == "doh" from hook generated metadata: Requires-Dist (dnspython) Requirement not satisfied: h2 (>=4.1.0) ; extra == "doh" Handling httpcore (>=0.17.3) ; extra == "doh" from hook generated metadata: Requires-Dist (dnspython) Requirement not satisfied: httpcore (>=0.17.3) ; extra == "doh" Handling httpx (>=0.24.1) ; extra == "doh" from hook generated metadata: Requires-Dist (dnspython) Requirement not satisfied: httpx (>=0.24.1) ; extra == "doh" Handling idna (>=2.1,<4.0) ; extra == "idna" from hook generated metadata: Requires-Dist (dnspython) Requirement not satisfied: idna (>=2.1,<4.0) ; extra == "idna" Handling trio (>=0.14,<0.23) ; extra == "trio" from hook generated metadata: Requires-Dist (dnspython) Requirement not satisfied: trio (>=0.14,<0.23) ; extra == "trio" Handling wmi (>=1.5.1,<2.0.0) ; extra == "wmi" from hook generated metadata: Requires-Dist (dnspython) Ignoring alien requirement: wmi (>=1.5.1,<2.0.0) ; extra == "wmi" + cat /builddir/build/BUILD/python-dns-2.4.2-1.fc39.noarch-pyproject-buildrequires + rm -rfv dnspython-2.4.2.dist-info/ removed 'dnspython-2.4.2.dist-info/WHEEL' removed 'dnspython-2.4.2.dist-info/METADATA' removed 'dnspython-2.4.2.dist-info/LICENSE' removed directory 'dnspython-2.4.2.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-dns-2.4.2-1.fc39.buildreqs.nosrc.rpm Child return code was: 11 Dynamic buildrequires detected Going to install missing buildrequires. See root.log for details. ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-dns.spec'], chrootPath='/var/lib/mock/f39-build-1847000-42128/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=982gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueraiseExc=FalseprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -br --noclean --target noarch --nodeps /builddir/build/SPECS/python-dns.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1691625600 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.7Ihfyv + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf dnspython-2.4.2 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/dnspython-2.4.2.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + cd dnspython-2.4.2 + rm -rf /builddir/build/BUILD/dnspython-2.4.2-SPECPARTS + /usr/bin/mkdir -p /builddir/build/BUILD/dnspython-2.4.2-SPECPARTS + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + find examples -type f + xargs chmod a-x + sed -i 's/cryptography = {version=">=2.6,<40.0"/cryptography = {version=">=2.6,<42.0"/' pyproject.toml + sed -i 's/requests-toolbelt = {version=">=0.9.1,<0.11.0"/requests-toolbelt = {version=">=0.9.1,<=1.0.0"/' pyproject.toml + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.0JpAb4 + umask 022 + cd /builddir/build/BUILD + cd dnspython-2.4.2 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.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-dns-2.4.2-1.fc39.noarch-pyproject-buildrequires -r -x dnssec -x idna -x trio -x doh Handling poetry-core from build-system.requires Requirement satisfied: poetry-core (installed: poetry-core 1.6.1) Handling aioquic (>=0.9.20) ; extra == "doq" from hook generated metadata: Requires-Dist (dnspython) Ignoring alien requirement: aioquic (>=0.9.20) ; extra == "doq" Handling cryptography (>=2.6,<42.0) ; extra == "dnssec" from hook generated metadata: Requires-Dist (dnspython) Requirement satisfied: cryptography (>=2.6,<42.0) ; extra == "dnssec" (installed: cryptography 41.0.5) Handling h2 (>=4.1.0) ; extra == "doh" from hook generated metadata: Requires-Dist (dnspython) Requirement satisfied: h2 (>=4.1.0) ; extra == "doh" (installed: h2 4.1.0) Handling httpcore (>=0.17.3) ; extra == "doh" from hook generated metadata: Requires-Dist (dnspython) Requirement satisfied: httpcore (>=0.17.3) ; extra == "doh" (installed: httpcore 0.17.3) Handling httpx (>=0.24.1) ; extra == "doh" from hook generated metadata: Requires-Dist (dnspython) Requirement satisfied: httpx (>=0.24.1) ; extra == "doh" (installed: httpx 0.24.1) Handling idna (>=2.1,<4.0) ; extra == "idna" from hook generated metadata: Requires-Dist (dnspython) Requirement satisfied: idna (>=2.1,<4.0) ; extra == "idna" (installed: idna 3.4) Handling trio (>=0.14,<0.23) ; extra == "trio" from hook generated metadata: Requires-Dist (dnspython) Requirement satisfied: trio (>=0.14,<0.23) ; extra == "trio" (installed: trio 0.22.0) Handling wmi (>=1.5.1,<2.0.0) ; extra == "wmi" from hook generated metadata: Requires-Dist (dnspython) Ignoring alien requirement: wmi (>=1.5.1,<2.0.0) ; extra == "wmi" + cat /builddir/build/BUILD/python-dns-2.4.2-1.fc39.noarch-pyproject-buildrequires + rm -rfv dnspython-2.4.2.dist-info/ removed 'dnspython-2.4.2.dist-info/WHEEL' removed 'dnspython-2.4.2.dist-info/METADATA' removed 'dnspython-2.4.2.dist-info/LICENSE' removed directory 'dnspython-2.4.2.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-dns-2.4.2-1.fc39.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-dns.spec'], chrootPath='/var/lib/mock/f39-build-1847000-42128/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=982gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-dns.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: noarch Building for target noarch setting SOURCE_DATE_EPOCH=1691625600 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.hr03lA + umask 022 + cd /builddir/build/BUILD + cd dnspython-2.4.2 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo '(python3dist(tomli) if python3-devel < 3.11)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + mkdir -p /builddir/build/BUILD/.pyproject-builddir + echo -n + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/.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-dns-2.4.2-1.fc39.noarch-pyproject-buildrequires -r -x dnssec -x idna -x trio -x doh Handling poetry-core from build-system.requires Requirement satisfied: poetry-core (installed: poetry-core 1.6.1) Handling aioquic (>=0.9.20) ; extra == "doq" from hook generated metadata: Requires-Dist (dnspython) Ignoring alien requirement: aioquic (>=0.9.20) ; extra == "doq" Handling cryptography (>=2.6,<42.0) ; extra == "dnssec" from hook generated metadata: Requires-Dist (dnspython) Requirement satisfied: cryptography (>=2.6,<42.0) ; extra == "dnssec" (installed: cryptography 41.0.5) Handling h2 (>=4.1.0) ; extra == "doh" from hook generated metadata: Requires-Dist (dnspython) Requirement satisfied: h2 (>=4.1.0) ; extra == "doh" (installed: h2 4.1.0) Handling httpcore (>=0.17.3) ; extra == "doh" from hook generated metadata: Requires-Dist (dnspython) Requirement satisfied: httpcore (>=0.17.3) ; extra == "doh" (installed: httpcore 0.17.3) Handling httpx (>=0.24.1) ; extra == "doh" from hook generated metadata: Requires-Dist (dnspython) Requirement satisfied: httpx (>=0.24.1) ; extra == "doh" (installed: httpx 0.24.1) Handling idna (>=2.1,<4.0) ; extra == "idna" from hook generated metadata: Requires-Dist (dnspython) Requirement satisfied: idna (>=2.1,<4.0) ; extra == "idna" (installed: idna 3.4) Handling trio (>=0.14,<0.23) ; extra == "trio" from hook generated metadata: Requires-Dist (dnspython) Requirement satisfied: trio (>=0.14,<0.23) ; extra == "trio" (installed: trio 0.22.0) Handling wmi (>=1.5.1,<2.0.0) ; extra == "wmi" from hook generated metadata: Requires-Dist (dnspython) Ignoring alien requirement: wmi (>=1.5.1,<2.0.0) ; extra == "wmi" + cat /builddir/build/BUILD/python-dns-2.4.2-1.fc39.noarch-pyproject-buildrequires + rm -rfv dnspython-2.4.2.dist-info/ removed 'dnspython-2.4.2.dist-info/WHEEL' removed 'dnspython-2.4.2.dist-info/METADATA' removed 'dnspython-2.4.2.dist-info/LICENSE' removed directory 'dnspython-2.4.2.dist-info/' + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.kTVmmT + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-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 dnspython-2.4.2 + mkdir -p /builddir/build/BUILD/dnspython-2.4.2/.pyproject-builddir + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + TMPDIR=/builddir/build/BUILD/dnspython-2.4.2/.pyproject-builddir + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_wheel.py /builddir/build/BUILD/dnspython-2.4.2/pyproject-wheeldir Processing /builddir/build/BUILD/dnspython-2.4.2 Preparing metadata (pyproject.toml): started Running command Preparing metadata (pyproject.toml) Preparing metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: dnspython Building wheel for dnspython (pyproject.toml): started Running command Building wheel for dnspython (pyproject.toml) Building wheel for dnspython (pyproject.toml): finished with status 'done' Created wheel for dnspython: filename=dnspython-2.4.2-py3-none-any.whl size=300366 sha256=57c6fbaaeaaf39c891292012060beb141791735dbb4004798328fc2c467402d8 Stored in directory: /builddir/.cache/pip/wheels/b6/ef/59/0aa9d62ad9c345049c6c1bf02a476b9b728da741ccdbf26d86 Successfully built dnspython + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.dZg9E7 + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch ++ dirname /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-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 dnspython-2.4.2 ++ ls /builddir/build/BUILD/dnspython-2.4.2/pyproject-wheeldir/dnspython-2.4.2-py3-none-any.whl ++ xargs basename --multiple ++ sed -E 's/([^-]+)-([^-]+)-.+\.whl/\1==\2/' + specifier=dnspython==2.4.2 + TMPDIR=/builddir/build/BUILD/dnspython-2.4.2/.pyproject-builddir + /usr/bin/python3 -m pip install --root /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.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/dnspython-2.4.2/pyproject-wheeldir dnspython==2.4.2 Using pip 23.2.1 from /usr/lib/python3.12/site-packages/pip (python 3.12) Looking in links: /builddir/build/BUILD/dnspython-2.4.2/pyproject-wheeldir Processing ./pyproject-wheeldir/dnspython-2.4.2-py3-none-any.whl Installing collected packages: dnspython Successfully installed dnspython-2.4.2 + '[' -d /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch/usr/bin ']' + rm -f /builddir/build/BUILD/python-dns-2.4.2-1.fc39.noarch-pyproject-ghost-distinfo + site_dirs=() + '[' -d /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch/usr/lib/python3.12/site-packages ']' + site_dirs+=("/usr/lib/python3.12/site-packages") + '[' /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch/usr/lib64/python3.12/site-packages '!=' /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch/usr/lib/python3.12/site-packages ']' + '[' -d /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch/usr/lib64/python3.12/site-packages ']' + for site_dir in ${site_dirs[@]} + for distinfo in /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch$site_dir/*.dist-info + echo '%ghost /usr/lib/python3.12/site-packages/dnspython-2.4.2.dist-info' + sed -i s/pip/rpm/ /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch/usr/lib/python3.12/site-packages/dnspython-2.4.2.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-dns-2.4.2-1.fc39.noarch --record /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch/usr/lib/python3.12/site-packages/dnspython-2.4.2.dist-info/RECORD --output /builddir/build/BUILD/python-dns-2.4.2-1.fc39.noarch-pyproject-record + rm -fv /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch/usr/lib/python3.12/site-packages/dnspython-2.4.2.dist-info/RECORD removed '/builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch/usr/lib/python3.12/site-packages/dnspython-2.4.2.dist-info/RECORD' + rm -fv /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch/usr/lib/python3.12/site-packages/dnspython-2.4.2.dist-info/REQUESTED removed '/builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch/usr/lib/python3.12/site-packages/dnspython-2.4.2.dist-info/REQUESTED' ++ wc -l /builddir/build/BUILD/python-dns-2.4.2-1.fc39.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-dns-2.4.2-1.fc39.noarch-pyproject-files --output-modules /builddir/build/BUILD/python-dns-2.4.2-1.fc39.noarch-pyproject-modules --buildroot /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.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-dns-2.4.2-1.fc39.noarch-pyproject-record --prefix /usr dns + /usr/bin/find-debuginfo -j64 --strict-build-id -m -i --build-id-seed 2.4.2-1.fc39 --unique-debug-suffix -2.4.2-1.fc39.noarch --unique-debug-src-base python-dns-2.4.2-1.fc39.noarch --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/dnspython-2.4.2 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 -j64 Bytecompiling .py files below /builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch/usr/lib/python3.12 using python3.12 + /usr/lib/rpm/redhat/brp-python-hardlink Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.J8JBpH + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-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 dnspython-2.4.2 + export OPENSSL_ENABLE_SHA1_SIGNATURES=yes + OPENSSL_ENABLE_SHA1_SIGNATURES=yes + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 ' + PATH=/builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch/usr/lib64/python3.12/site-packages:/builddir/build/BUILDROOT/python-dns-2.4.2-1.fc39.noarch/usr/lib/python3.12/site-packages + PYTHONDONTWRITEBYTECODE=1 + PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/dnspython-2.4.2/.pyproject-builddir' + PYTEST_XDIST_AUTO_NUM_WORKERS=64 + /usr/bin/pytest ============================= test session starts ============================== platform linux -- Python 3.12.0, pytest-7.3.2, pluggy-1.2.0 rootdir: /builddir/build/BUILD/dnspython-2.4.2 configfile: pytest.ini plugins: anyio-3.7.0 collected 1332 items tests/test_address.py .... [ 0%] tests/test_async.py .......FFFFFF..FFF....FFFFFF...FFFF.....FFFFFF..FFF. [ 4%] ...FFFFFF...FFFF [ 5%] tests/test_bugs.py ....... [ 5%] tests/test_constants.py ..... [ 6%] tests/test_ddr.py FF [ 6%] tests/test_dnssec.py ................................................... [ 10%] .............. [ 11%] tests/test_dnssecalgs.py ......... [ 12%] tests/test_doh.py FFFFFFF [ 12%] tests/test_doq.py sss [ 12%] tests/test_edns.py .............. [ 13%] tests/test_entropy.py ..... [ 14%] tests/test_exceptions.py ..... [ 14%] tests/test_flags.py ............ [ 15%] tests/test_generate.py ................. [ 16%] tests/test_grange.py .......... [ 17%] tests/test_immutable.py ...... [ 17%] tests/test_message.py .................................................. [ 21%] ................ [ 22%] tests/test_name.py ..................................................... [ 26%] ........................................................................ [ 32%] ............................................... [ 35%] tests/test_namedict.py ...................... [ 37%] tests/test_nsec3.py .. [ 37%] tests/test_nsec3_hash.py ... [ 37%] tests/test_ntoaaton.py ............................................. [ 41%] tests/test_processing_order.py .......... [ 41%] tests/test_query.py ..FFFF............................... [ 44%] tests/test_rdata.py .................................................... [ 48%] ...................................... [ 51%] tests/test_rdataset.py .................. [ 52%] tests/test_rdtypeandclass.py .......................... [ 54%] tests/test_rdtypeanydnskey.py .. [ 54%] tests/test_rdtypeanyeui.py ........................ [ 56%] tests/test_rdtypeanyloc.py .... [ 57%] tests/test_rdtypeanytkey.py .... [ 57%] tests/test_renderer.py ..... [ 57%] tests/test_resolution.py ............................... [ 60%] tests/test_resolver.py ..........................FFF.sFFFF.FFFFFFFFFFFFF [ 63%] F.sFFFF.FFFFFFFFFFFFFF.sFFFF.FFFFFFFFFFF............... [ 67%] tests/test_resolver_override.py F...F........F [ 68%] tests/test_rrset.py ...................... [ 70%] tests/test_rrset_reader.py ............ [ 71%] tests/test_serial.py ........... [ 72%] tests/test_set.py ................................................... [ 76%] tests/test_svcb.py ................ [ 77%] tests/test_tokenizer.py ................................................ [ 80%] [ 80%] tests/test_transaction.py .............................................. [ 84%] . [ 84%] tests/test_tsig.py .................... [ 85%] tests/test_tsigkeyring.py ....... [ 86%] tests/test_ttl.py ....... [ 87%] tests/test_update.py ....................... [ 88%] tests/test_wire.py ....... [ 89%] tests/test_xfr.py ................................ [ 91%] tests/test_zone.py ..................................................... [ 95%] ............................................... [ 99%] tests/test_zonedigest.py ........... [100%] =================================== FAILURES =================================== ______________________ AsyncTests.testCanonicalNameCNAME _______________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testCanonicalNameCNAME(self): name = dns.name.from_text("www.dnspython.org") cname = dns.name.from_text("dmfrjf4ips8xa.cloudfront.net") async def run(): return await dns.asyncresolver.canonical_name(name) > self.assertEqual(self.async_run(run), cname) tests/test_async.py:258: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:256: in run return await dns.asyncresolver.canonical_name(name) dns/asyncresolver.py:348: in canonical_name return await get_default_resolver().canonical_name(name) dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _____________________ AsyncTests.testCanonicalNameDangling _____________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(_systemd_resolved_present, "systemd-resolved in use") def testCanonicalNameDangling(self): name = dns.name.from_text("dangling-cname.dnspython.org") cname = dns.name.from_text("dangling-target.dnspython.org") async def run(): return await dns.asyncresolver.canonical_name(name) > self.assertEqual(self.async_run(run), cname) tests/test_async.py:268: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:266: in run return await dns.asyncresolver.canonical_name(name) dns/asyncresolver.py:348: in canonical_name return await get_default_resolver().canonical_name(name) dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _____________________ AsyncTests.testCanonicalNameNoCNAME ______________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testCanonicalNameNoCNAME(self): cname = dns.name.from_text("www.google.com") async def run(): return await dns.asyncresolver.canonical_name("www.google.com") > self.assertEqual(self.async_run(run), cname) tests/test_async.py:249: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:247: in run return await dns.asyncresolver.canonical_name("www.google.com") dns/asyncresolver.py:348: in canonical_name return await get_default_resolver().canonical_name(name) dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _________________________ AsyncTests.testDOHGetRequest _________________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not dns.query._have_httpx, "httpx not available") def testDOHGetRequest(self): async def run(): nameserver_url = random.choice(KNOWN_ANYCAST_DOH_RESOLVER_URLS) q = dns.message.make_query("example.com.", dns.rdatatype.A) r = await dns.asyncquery.https( q, nameserver_url, post=False, timeout=4, family=family ) self.assertTrue(q.is_response(r)) > self.async_run(run) tests/test_async.py:542: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:537: in run r = await dns.asyncquery.https( dns/asyncquery.py:538: in https transport = backend.get_transport_class()( dns/_asyncio_backend.py:202: in __init__ resolver = dns.asyncresolver.Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ______________________ AsyncTests.testDOHGetRequestHttp1 _______________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not dns.query._have_httpx, "httpx not available") def testDOHGetRequestHttp1(self): async def run(): saved_have_http2 = dns.query._have_http2 try: dns.query._have_http2 = False nameserver_url = random.choice(KNOWN_ANYCAST_DOH_RESOLVER_URLS) q = dns.message.make_query("example.com.", dns.rdatatype.A) r = await dns.asyncquery.https( q, nameserver_url, post=False, timeout=4, family=family ) self.assertTrue(q.is_response(r)) finally: dns.query._have_http2 = saved_have_http2 > self.async_run(run) tests/test_async.py:559: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:552: in run r = await dns.asyncquery.https( dns/asyncquery.py:538: in https transport = backend.get_transport_class()( dns/_asyncio_backend.py:202: in __init__ resolver = dns.asyncresolver.Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ________________________ AsyncTests.testDOHPostRequest _________________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not dns.query._have_httpx, "httpx not available") def testDOHPostRequest(self): async def run(): nameserver_url = random.choice(KNOWN_ANYCAST_DOH_RESOLVER_URLS) q = dns.message.make_query("example.com.", dns.rdatatype.A) r = await dns.asyncquery.https( q, nameserver_url, post=True, timeout=4, family=family ) self.assertTrue(q.is_response(r)) > self.async_run(run) tests/test_async.py:571: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:566: in run r = await dns.asyncquery.https( dns/asyncquery.py:538: in https transport = backend.get_transport_class()( dns/_asyncio_backend.py:202: in __init__ resolver = dns.asyncresolver.Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ___________________________ AsyncTests.testQueryTLS ____________________________ fut = , timeout = 2 async def wait_for(fut, timeout): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. If the task supresses the cancellation and returns a value instead, that value is returned. This function is a coroutine. """ # The special case for timeout <= 0 is for the following case: # # async def test_waitfor(): # func_started = False # # async def func(): # nonlocal func_started # func_started = True # # try: # await asyncio.wait_for(func(), 0) # except asyncio.TimeoutError: # assert not func_started # else: # assert False # # asyncio.run(test_waitfor()) if timeout is not None and timeout <= 0: fut = ensure_future(fut) if fut.done(): return fut.result() await _cancel_and_wait(fut) try: return fut.result() except exceptions.CancelledError as exc: raise TimeoutError from exc async with timeouts.timeout(timeout): > return await fut /usr/lib64/python3.12/asyncio/tasks.py:510: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ host = '8.8.8.8', port = 853, limit = 65536 kwds = {'family': , 'local_addr': None, 'proto': 0, 'server_hostname': None, ...} loop = <_UnixSelectorEventLoop running=False closed=True debug=False> reader = async def open_connection(host=None, port=None, *, limit=_DEFAULT_LIMIT, **kwds): """A wrapper for create_connection() returning a (reader, writer) pair. The reader returned is a StreamReader instance; the writer is a StreamWriter instance. The arguments are all the usual arguments to create_connection() except protocol_factory; most common are positional host and port, with various optional keyword arguments following. Additional optional keyword arguments are loop (to set the event loop instance to use) and limit (to set the buffer limit passed to the StreamReader). (If you want to customize the StreamReader and/or StreamReaderProtocol classes, just copy the code -- there's really nothing special here except some convenience.) """ loop = events.get_running_loop() reader = StreamReader(limit=limit, loop=loop) protocol = StreamReaderProtocol(reader, loop=loop) > transport, _ = await loop.create_connection( lambda: protocol, host, port, **kwds) /usr/lib64/python3.12/asyncio/streams.py:47: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> protocol_factory = . at 0x3f96a29e40> host = '8.8.8.8', port = 853 async def create_connection( self, protocol_factory, host=None, port=None, *, ssl=None, family=0, proto=0, flags=0, sock=None, local_addr=None, server_hostname=None, ssl_handshake_timeout=None, ssl_shutdown_timeout=None, happy_eyeballs_delay=None, interleave=None, all_errors=False): """Connect to a TCP server. Create a streaming transport connection to a given internet host and port: socket family AF_INET or socket.AF_INET6 depending on host (or family if specified), socket type SOCK_STREAM. protocol_factory must be a callable returning a protocol instance. This method is a coroutine which will try to establish the connection in the background. When successful, the coroutine returns a (transport, protocol) pair. """ if server_hostname is not None and not ssl: raise ValueError('server_hostname is only meaningful with ssl') if server_hostname is None and ssl: # Use host as default for server_hostname. It is an error # if host is empty or not set, e.g. when an # already-connected socket was passed or when only a port # is given. To avoid this error, you can pass # server_hostname='' -- this will bypass the hostname # check. (This also means that if host is a numeric # IP/IPv6 address, we will attempt to verify that exact # address; this will probably fail, but it is possible to # create a certificate for a specific IP address, so we # don't judge it here.) if not host: raise ValueError('You must set server_hostname ' 'when using ssl without a host') server_hostname = host if ssl_handshake_timeout is not None and not ssl: raise ValueError( 'ssl_handshake_timeout is only meaningful with ssl') if ssl_shutdown_timeout is not None and not ssl: raise ValueError( 'ssl_shutdown_timeout is only meaningful with ssl') if sock is not None: _check_ssl_socket(sock) if happy_eyeballs_delay is not None and interleave is None: # If using happy eyeballs, default to interleave addresses by family interleave = 1 if host is not None or port is not None: if sock is not None: raise ValueError( 'host/port and sock can not be specified at the same time') infos = await self._ensure_resolved( (host, port), family=family, type=socket.SOCK_STREAM, proto=proto, flags=flags, loop=self) if not infos: raise OSError('getaddrinfo() returned empty list') if local_addr is not None: laddr_infos = await self._ensure_resolved( local_addr, family=family, type=socket.SOCK_STREAM, proto=proto, flags=flags, loop=self) if not laddr_infos: raise OSError('getaddrinfo() returned empty list') else: laddr_infos = None if interleave: infos = _interleave_addrinfos(infos, interleave) exceptions = [] if happy_eyeballs_delay is None: # not using happy eyeballs for addrinfo in infos: try: > sock = await self._connect_sock( exceptions, addrinfo, laddr_infos) /usr/lib64/python3.12/asyncio/base_events.py:1081: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> exceptions = None addr_info = (, , 6, '', ('8.8.8.8', 853)) local_addr_infos = None async def _connect_sock(self, exceptions, addr_info, local_addr_infos=None): """Create, bind and connect one socket.""" my_exceptions = [] exceptions.append(my_exceptions) family, type_, proto, _, address = addr_info sock = None try: sock = socket.socket(family=family, type=type_, proto=proto) sock.setblocking(False) if local_addr_infos is not None: for lfamily, _, _, _, laddr in local_addr_infos: # skip local addresses of different family if lfamily != family: continue try: sock.bind(laddr) break except OSError as exc: msg = ( f'error while attempting to bind on ' f'address {laddr!r}: ' f'{exc.strerror.lower()}' ) exc = OSError(exc.errno, msg) my_exceptions.append(exc) else: # all bind attempts failed if my_exceptions: raise my_exceptions.pop() else: raise OSError(f"no matching local address with {family=} found") > await self.sock_connect(sock, address) /usr/lib64/python3.12/asyncio/base_events.py:984: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> sock = address = ('8.8.8.8', 853) async def sock_connect(self, sock, address): """Connect to a remote socket at address. This method is a coroutine. """ base_events._check_ssl_socket(sock) if self._debug and sock.gettimeout() != 0: raise ValueError("the socket must be non-blocking") if sock.family == socket.AF_INET or ( base_events._HAS_IPv6 and sock.family == socket.AF_INET6): resolved = await self._ensure_resolved( address, family=sock.family, type=sock.type, proto=sock.proto, loop=self, ) _, _, _, _, address = resolved[0] fut = self.create_future() self._sock_connect(fut, sock, address) try: > return await fut E asyncio.exceptions.CancelledError /usr/lib64/python3.12/asyncio/selector_events.py:647: CancelledError The above exception was the direct cause of the following exception: awaitable = , timeout = 2 async def _maybe_wait_for(awaitable, timeout): if timeout is not None: try: > return await asyncio.wait_for(awaitable, timeout) dns/_asyncio_backend.py:56: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fut = , timeout = 2 async def wait_for(fut, timeout): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. If the task supresses the cancellation and returns a value instead, that value is returned. This function is a coroutine. """ # The special case for timeout <= 0 is for the following case: # # async def test_waitfor(): # func_started = False # # async def func(): # nonlocal func_started # func_started = True # # try: # await asyncio.wait_for(func(), 0) # except asyncio.TimeoutError: # assert not func_started # else: # assert False # # asyncio.run(test_waitfor()) if timeout is not None and timeout <= 0: fut = ensure_future(fut) if fut.done(): return fut.result() await _cancel_and_wait(fut) try: return fut.result() except exceptions.CancelledError as exc: raise TimeoutError from exc > async with timeouts.timeout(timeout): /usr/lib64/python3.12/asyncio/tasks.py:509: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = exc_type = exc_val = CancelledError(), exc_tb = async def __aexit__( self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType], ) -> Optional[bool]: assert self._state in (_State.ENTERED, _State.EXPIRING) if self._timeout_handler is not None: self._timeout_handler.cancel() self._timeout_handler = None if self._state is _State.EXPIRING: self._state = _State.EXPIRED if self._task.uncancel() <= self._cancelling and exc_type is exceptions.CancelledError: # Since there are no new cancel requests, we're # handling this. > raise TimeoutError from exc_val E TimeoutError /usr/lib64/python3.12/asyncio/timeouts.py:111: TimeoutError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not _ssl_available, "SSL not available") def testQueryTLS(self): for address in query_addresses: qname = dns.name.from_text("dns.google.") async def run(): q = dns.message.make_query(qname, dns.rdatatype.A) return await dns.asyncquery.tls(q, address, timeout=2) > response = self.async_run(run) tests/test_async.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:400: in run return await dns.asyncquery.tls(q, address, timeout=2) dns/asyncquery.py:452: in tls cm = await backend.make_socket( dns/_asyncio_backend.py:248: in make_socket (r, w) = await _maybe_wait_for( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ awaitable = , timeout = 2 async def _maybe_wait_for(awaitable, timeout): if timeout is not None: try: return await asyncio.wait_for(awaitable, timeout) except asyncio.TimeoutError: > raise dns.exception.Timeout(timeout=timeout) E dns.exception.Timeout: The DNS operation timed out after 2.000 seconds dns/_asyncio_backend.py:58: Timeout ______________________ AsyncTests.testQueryTLSWithContext ______________________ fut = , timeout = 2 async def wait_for(fut, timeout): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. If the task supresses the cancellation and returns a value instead, that value is returned. This function is a coroutine. """ # The special case for timeout <= 0 is for the following case: # # async def test_waitfor(): # func_started = False # # async def func(): # nonlocal func_started # func_started = True # # try: # await asyncio.wait_for(func(), 0) # except asyncio.TimeoutError: # assert not func_started # else: # assert False # # asyncio.run(test_waitfor()) if timeout is not None and timeout <= 0: fut = ensure_future(fut) if fut.done(): return fut.result() await _cancel_and_wait(fut) try: return fut.result() except exceptions.CancelledError as exc: raise TimeoutError from exc async with timeouts.timeout(timeout): > return await fut /usr/lib64/python3.12/asyncio/tasks.py:510: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ host = '8.8.8.8', port = 853, limit = 65536 kwds = {'family': , 'local_addr': None, 'proto': 0, 'server_hostname': None, ...} loop = <_UnixSelectorEventLoop running=False closed=True debug=False> reader = async def open_connection(host=None, port=None, *, limit=_DEFAULT_LIMIT, **kwds): """A wrapper for create_connection() returning a (reader, writer) pair. The reader returned is a StreamReader instance; the writer is a StreamWriter instance. The arguments are all the usual arguments to create_connection() except protocol_factory; most common are positional host and port, with various optional keyword arguments following. Additional optional keyword arguments are loop (to set the event loop instance to use) and limit (to set the buffer limit passed to the StreamReader). (If you want to customize the StreamReader and/or StreamReaderProtocol classes, just copy the code -- there's really nothing special here except some convenience.) """ loop = events.get_running_loop() reader = StreamReader(limit=limit, loop=loop) protocol = StreamReaderProtocol(reader, loop=loop) > transport, _ = await loop.create_connection( lambda: protocol, host, port, **kwds) /usr/lib64/python3.12/asyncio/streams.py:47: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> protocol_factory = . at 0x3f96a2a2a0> host = '8.8.8.8', port = 853 async def create_connection( self, protocol_factory, host=None, port=None, *, ssl=None, family=0, proto=0, flags=0, sock=None, local_addr=None, server_hostname=None, ssl_handshake_timeout=None, ssl_shutdown_timeout=None, happy_eyeballs_delay=None, interleave=None, all_errors=False): """Connect to a TCP server. Create a streaming transport connection to a given internet host and port: socket family AF_INET or socket.AF_INET6 depending on host (or family if specified), socket type SOCK_STREAM. protocol_factory must be a callable returning a protocol instance. This method is a coroutine which will try to establish the connection in the background. When successful, the coroutine returns a (transport, protocol) pair. """ if server_hostname is not None and not ssl: raise ValueError('server_hostname is only meaningful with ssl') if server_hostname is None and ssl: # Use host as default for server_hostname. It is an error # if host is empty or not set, e.g. when an # already-connected socket was passed or when only a port # is given. To avoid this error, you can pass # server_hostname='' -- this will bypass the hostname # check. (This also means that if host is a numeric # IP/IPv6 address, we will attempt to verify that exact # address; this will probably fail, but it is possible to # create a certificate for a specific IP address, so we # don't judge it here.) if not host: raise ValueError('You must set server_hostname ' 'when using ssl without a host') server_hostname = host if ssl_handshake_timeout is not None and not ssl: raise ValueError( 'ssl_handshake_timeout is only meaningful with ssl') if ssl_shutdown_timeout is not None and not ssl: raise ValueError( 'ssl_shutdown_timeout is only meaningful with ssl') if sock is not None: _check_ssl_socket(sock) if happy_eyeballs_delay is not None and interleave is None: # If using happy eyeballs, default to interleave addresses by family interleave = 1 if host is not None or port is not None: if sock is not None: raise ValueError( 'host/port and sock can not be specified at the same time') infos = await self._ensure_resolved( (host, port), family=family, type=socket.SOCK_STREAM, proto=proto, flags=flags, loop=self) if not infos: raise OSError('getaddrinfo() returned empty list') if local_addr is not None: laddr_infos = await self._ensure_resolved( local_addr, family=family, type=socket.SOCK_STREAM, proto=proto, flags=flags, loop=self) if not laddr_infos: raise OSError('getaddrinfo() returned empty list') else: laddr_infos = None if interleave: infos = _interleave_addrinfos(infos, interleave) exceptions = [] if happy_eyeballs_delay is None: # not using happy eyeballs for addrinfo in infos: try: > sock = await self._connect_sock( exceptions, addrinfo, laddr_infos) /usr/lib64/python3.12/asyncio/base_events.py:1081: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> exceptions = None addr_info = (, , 6, '', ('8.8.8.8', 853)) local_addr_infos = None async def _connect_sock(self, exceptions, addr_info, local_addr_infos=None): """Create, bind and connect one socket.""" my_exceptions = [] exceptions.append(my_exceptions) family, type_, proto, _, address = addr_info sock = None try: sock = socket.socket(family=family, type=type_, proto=proto) sock.setblocking(False) if local_addr_infos is not None: for lfamily, _, _, _, laddr in local_addr_infos: # skip local addresses of different family if lfamily != family: continue try: sock.bind(laddr) break except OSError as exc: msg = ( f'error while attempting to bind on ' f'address {laddr!r}: ' f'{exc.strerror.lower()}' ) exc = OSError(exc.errno, msg) my_exceptions.append(exc) else: # all bind attempts failed if my_exceptions: raise my_exceptions.pop() else: raise OSError(f"no matching local address with {family=} found") > await self.sock_connect(sock, address) /usr/lib64/python3.12/asyncio/base_events.py:984: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> sock = address = ('8.8.8.8', 853) async def sock_connect(self, sock, address): """Connect to a remote socket at address. This method is a coroutine. """ base_events._check_ssl_socket(sock) if self._debug and sock.gettimeout() != 0: raise ValueError("the socket must be non-blocking") if sock.family == socket.AF_INET or ( base_events._HAS_IPv6 and sock.family == socket.AF_INET6): resolved = await self._ensure_resolved( address, family=sock.family, type=sock.type, proto=sock.proto, loop=self, ) _, _, _, _, address = resolved[0] fut = self.create_future() self._sock_connect(fut, sock, address) try: > return await fut E asyncio.exceptions.CancelledError /usr/lib64/python3.12/asyncio/selector_events.py:647: CancelledError The above exception was the direct cause of the following exception: awaitable = , timeout = 2 async def _maybe_wait_for(awaitable, timeout): if timeout is not None: try: > return await asyncio.wait_for(awaitable, timeout) dns/_asyncio_backend.py:56: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fut = , timeout = 2 async def wait_for(fut, timeout): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. If the task supresses the cancellation and returns a value instead, that value is returned. This function is a coroutine. """ # The special case for timeout <= 0 is for the following case: # # async def test_waitfor(): # func_started = False # # async def func(): # nonlocal func_started # func_started = True # # try: # await asyncio.wait_for(func(), 0) # except asyncio.TimeoutError: # assert not func_started # else: # assert False # # asyncio.run(test_waitfor()) if timeout is not None and timeout <= 0: fut = ensure_future(fut) if fut.done(): return fut.result() await _cancel_and_wait(fut) try: return fut.result() except exceptions.CancelledError as exc: raise TimeoutError from exc > async with timeouts.timeout(timeout): /usr/lib64/python3.12/asyncio/tasks.py:509: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = exc_type = exc_val = CancelledError(), exc_tb = async def __aexit__( self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType], ) -> Optional[bool]: assert self._state in (_State.ENTERED, _State.EXPIRING) if self._timeout_handler is not None: self._timeout_handler.cancel() self._timeout_handler = None if self._state is _State.EXPIRING: self._state = _State.EXPIRED if self._task.uncancel() <= self._cancelling and exc_type is exceptions.CancelledError: # Since there are no new cancel requests, we're # handling this. > raise TimeoutError from exc_val E TimeoutError /usr/lib64/python3.12/asyncio/timeouts.py:111: TimeoutError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not _ssl_available, "SSL not available") def testQueryTLSWithContext(self): for address in query_addresses: qname = dns.name.from_text("dns.google.") async def run(): ssl_context = ssl.create_default_context() ssl_context.check_hostname = True q = dns.message.make_query(qname, dns.rdatatype.A) return await dns.asyncquery.tls( q, address, timeout=2, ssl_context=ssl_context ) > response = self.async_run(run) tests/test_async.py:424: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:420: in run return await dns.asyncquery.tls( dns/asyncquery.py:452: in tls cm = await backend.make_socket( dns/_asyncio_backend.py:248: in make_socket (r, w) = await _maybe_wait_for( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ awaitable = , timeout = 2 async def _maybe_wait_for(awaitable, timeout): if timeout is not None: try: return await asyncio.wait_for(awaitable, timeout) except asyncio.TimeoutError: > raise dns.exception.Timeout(timeout=timeout) E dns.exception.Timeout: The DNS operation timed out after 2.000 seconds dns/_asyncio_backend.py:58: Timeout ______________________ AsyncTests.testQueryTLSWithSocket _______________________ fut = , timeout = 2 async def wait_for(fut, timeout): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. If the task supresses the cancellation and returns a value instead, that value is returned. This function is a coroutine. """ # The special case for timeout <= 0 is for the following case: # # async def test_waitfor(): # func_started = False # # async def func(): # nonlocal func_started # func_started = True # # try: # await asyncio.wait_for(func(), 0) # except asyncio.TimeoutError: # assert not func_started # else: # assert False # # asyncio.run(test_waitfor()) if timeout is not None and timeout <= 0: fut = ensure_future(fut) if fut.done(): return fut.result() await _cancel_and_wait(fut) try: return fut.result() except exceptions.CancelledError as exc: raise TimeoutError from exc async with timeouts.timeout(timeout): > return await fut /usr/lib64/python3.12/asyncio/tasks.py:510: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ host = '8.8.8.8', port = 853, limit = 65536 kwds = {'family': , 'local_addr': None, 'proto': 0, 'server_hostname': None, ...} loop = <_UnixSelectorEventLoop running=False closed=True debug=False> reader = async def open_connection(host=None, port=None, *, limit=_DEFAULT_LIMIT, **kwds): """A wrapper for create_connection() returning a (reader, writer) pair. The reader returned is a StreamReader instance; the writer is a StreamWriter instance. The arguments are all the usual arguments to create_connection() except protocol_factory; most common are positional host and port, with various optional keyword arguments following. Additional optional keyword arguments are loop (to set the event loop instance to use) and limit (to set the buffer limit passed to the StreamReader). (If you want to customize the StreamReader and/or StreamReaderProtocol classes, just copy the code -- there's really nothing special here except some convenience.) """ loop = events.get_running_loop() reader = StreamReader(limit=limit, loop=loop) protocol = StreamReaderProtocol(reader, loop=loop) > transport, _ = await loop.create_connection( lambda: protocol, host, port, **kwds) /usr/lib64/python3.12/asyncio/streams.py:47: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> protocol_factory = . at 0x3f96a2a020> host = '8.8.8.8', port = 853 async def create_connection( self, protocol_factory, host=None, port=None, *, ssl=None, family=0, proto=0, flags=0, sock=None, local_addr=None, server_hostname=None, ssl_handshake_timeout=None, ssl_shutdown_timeout=None, happy_eyeballs_delay=None, interleave=None, all_errors=False): """Connect to a TCP server. Create a streaming transport connection to a given internet host and port: socket family AF_INET or socket.AF_INET6 depending on host (or family if specified), socket type SOCK_STREAM. protocol_factory must be a callable returning a protocol instance. This method is a coroutine which will try to establish the connection in the background. When successful, the coroutine returns a (transport, protocol) pair. """ if server_hostname is not None and not ssl: raise ValueError('server_hostname is only meaningful with ssl') if server_hostname is None and ssl: # Use host as default for server_hostname. It is an error # if host is empty or not set, e.g. when an # already-connected socket was passed or when only a port # is given. To avoid this error, you can pass # server_hostname='' -- this will bypass the hostname # check. (This also means that if host is a numeric # IP/IPv6 address, we will attempt to verify that exact # address; this will probably fail, but it is possible to # create a certificate for a specific IP address, so we # don't judge it here.) if not host: raise ValueError('You must set server_hostname ' 'when using ssl without a host') server_hostname = host if ssl_handshake_timeout is not None and not ssl: raise ValueError( 'ssl_handshake_timeout is only meaningful with ssl') if ssl_shutdown_timeout is not None and not ssl: raise ValueError( 'ssl_shutdown_timeout is only meaningful with ssl') if sock is not None: _check_ssl_socket(sock) if happy_eyeballs_delay is not None and interleave is None: # If using happy eyeballs, default to interleave addresses by family interleave = 1 if host is not None or port is not None: if sock is not None: raise ValueError( 'host/port and sock can not be specified at the same time') infos = await self._ensure_resolved( (host, port), family=family, type=socket.SOCK_STREAM, proto=proto, flags=flags, loop=self) if not infos: raise OSError('getaddrinfo() returned empty list') if local_addr is not None: laddr_infos = await self._ensure_resolved( local_addr, family=family, type=socket.SOCK_STREAM, proto=proto, flags=flags, loop=self) if not laddr_infos: raise OSError('getaddrinfo() returned empty list') else: laddr_infos = None if interleave: infos = _interleave_addrinfos(infos, interleave) exceptions = [] if happy_eyeballs_delay is None: # not using happy eyeballs for addrinfo in infos: try: > sock = await self._connect_sock( exceptions, addrinfo, laddr_infos) /usr/lib64/python3.12/asyncio/base_events.py:1081: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> exceptions = None addr_info = (, , 6, '', ('8.8.8.8', 853)) local_addr_infos = None async def _connect_sock(self, exceptions, addr_info, local_addr_infos=None): """Create, bind and connect one socket.""" my_exceptions = [] exceptions.append(my_exceptions) family, type_, proto, _, address = addr_info sock = None try: sock = socket.socket(family=family, type=type_, proto=proto) sock.setblocking(False) if local_addr_infos is not None: for lfamily, _, _, _, laddr in local_addr_infos: # skip local addresses of different family if lfamily != family: continue try: sock.bind(laddr) break except OSError as exc: msg = ( f'error while attempting to bind on ' f'address {laddr!r}: ' f'{exc.strerror.lower()}' ) exc = OSError(exc.errno, msg) my_exceptions.append(exc) else: # all bind attempts failed if my_exceptions: raise my_exceptions.pop() else: raise OSError(f"no matching local address with {family=} found") > await self.sock_connect(sock, address) /usr/lib64/python3.12/asyncio/base_events.py:984: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=True debug=False> sock = address = ('8.8.8.8', 853) async def sock_connect(self, sock, address): """Connect to a remote socket at address. This method is a coroutine. """ base_events._check_ssl_socket(sock) if self._debug and sock.gettimeout() != 0: raise ValueError("the socket must be non-blocking") if sock.family == socket.AF_INET or ( base_events._HAS_IPv6 and sock.family == socket.AF_INET6): resolved = await self._ensure_resolved( address, family=sock.family, type=sock.type, proto=sock.proto, loop=self, ) _, _, _, _, address = resolved[0] fut = self.create_future() self._sock_connect(fut, sock, address) try: > return await fut E asyncio.exceptions.CancelledError /usr/lib64/python3.12/asyncio/selector_events.py:647: CancelledError The above exception was the direct cause of the following exception: awaitable = , timeout = 2 async def _maybe_wait_for(awaitable, timeout): if timeout is not None: try: > return await asyncio.wait_for(awaitable, timeout) dns/_asyncio_backend.py:56: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fut = , timeout = 2 async def wait_for(fut, timeout): """Wait for the single Future or coroutine to complete, with timeout. Coroutine will be wrapped in Task. Returns result of the Future or coroutine. When a timeout occurs, it cancels the task and raises TimeoutError. To avoid the task cancellation, wrap it in shield(). If the wait is cancelled, the task is also cancelled. If the task supresses the cancellation and returns a value instead, that value is returned. This function is a coroutine. """ # The special case for timeout <= 0 is for the following case: # # async def test_waitfor(): # func_started = False # # async def func(): # nonlocal func_started # func_started = True # # try: # await asyncio.wait_for(func(), 0) # except asyncio.TimeoutError: # assert not func_started # else: # assert False # # asyncio.run(test_waitfor()) if timeout is not None and timeout <= 0: fut = ensure_future(fut) if fut.done(): return fut.result() await _cancel_and_wait(fut) try: return fut.result() except exceptions.CancelledError as exc: raise TimeoutError from exc > async with timeouts.timeout(timeout): /usr/lib64/python3.12/asyncio/tasks.py:509: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = exc_type = exc_val = CancelledError(), exc_tb = async def __aexit__( self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType], ) -> Optional[bool]: assert self._state in (_State.ENTERED, _State.EXPIRING) if self._timeout_handler is not None: self._timeout_handler.cancel() self._timeout_handler = None if self._state is _State.EXPIRING: self._state = _State.EXPIRED if self._task.uncancel() <= self._cancelling and exc_type is exceptions.CancelledError: # Since there are no new cancel requests, we're # handling this. > raise TimeoutError from exc_val E TimeoutError /usr/lib64/python3.12/asyncio/timeouts.py:111: TimeoutError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not _ssl_available, "SSL not available") def testQueryTLSWithSocket(self): for address in query_addresses: qname = dns.name.from_text("dns.google.") async def run(): ssl_context = ssl.create_default_context() ssl_context.check_hostname = False async with await self.backend.make_socket( dns.inet.af_for_address(address), socket.SOCK_STREAM, 0, None, (address, 853), 2, ssl_context, None, ) as s: # for basic coverage await s.getsockname() q = dns.message.make_query(qname, dns.rdatatype.A) return await dns.asyncquery.tls(q, "8.8.8.8", sock=s, timeout=2) > response = self.async_run(run) tests/test_async.py:456: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:441: in run async with await self.backend.make_socket( dns/_asyncio_backend.py:248: in make_socket (r, w) = await _maybe_wait_for( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ awaitable = , timeout = 2 async def _maybe_wait_for(awaitable, timeout): if timeout is not None: try: return await asyncio.wait_for(awaitable, timeout) except asyncio.TimeoutError: > raise dns.exception.Timeout(timeout=timeout) E dns.exception.Timeout: The DNS operation timed out after 2.000 seconds dns/_asyncio_backend.py:58: Timeout ____________________________ AsyncTests.testResolve ____________________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolve(self): async def run(): answer = await dns.asyncresolver.resolve("dns.google.", "A") return set([rdata.address for rdata in answer]) > seen = self.async_run(run) tests/test_async.py:187: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:184: in run answer = await dns.asyncresolver.resolve("dns.google.", "A") dns/asyncresolver.py:303: in resolve return await get_default_resolver().resolve( dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ________________________ AsyncTests.testResolveAddress _________________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveAddress(self): async def run(): return await dns.asyncresolver.resolve_address("8.8.8.8") > answer = self.async_run(run) tests/test_async.py:195: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:193: in run return await dns.asyncresolver.resolve_address("8.8.8.8") dns/asyncresolver.py:326: in resolve_address return await get_default_resolver().resolve_address(ipaddr, *args, **kwargs) dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _______________________ AsyncTests.testResolveAtAddress ________________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not tests.util.have_ipv4(), "IPv4 not reachable") def testResolveAtAddress(self): async def run(): answer = await dns.asyncresolver.resolve_at("8.8.8.8", "dns.google.", "A") seen = set([rdata.address for rdata in answer]) self.assertIn("8.8.8.8", seen) self.assertIn("8.8.4.4", seen) > self.async_run(run) tests/test_async.py:593: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:588: in run answer = await dns.asyncresolver.resolve_at("8.8.8.8", "dns.google.", "A") dns/asyncresolver.py:463: in resolve_at res = await make_resolver_at(where, port, family, resolver) dns/asyncresolver.py:421: in make_resolver_at resolver = get_default_resolver() dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _________________________ AsyncTests.testResolveAtName _________________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not tests.util.have_ipv4(), "IPv4 not reachable") def testResolveAtName(self): async def run(): answer = await dns.asyncresolver.resolve_at( "dns.google", "dns.google.", "A", family=socket.AF_INET ) seen = set([rdata.address for rdata in answer]) self.assertIn("8.8.8.8", seen) self.assertIn("8.8.4.4", seen) > self.async_run(run) tests/test_async.py:605: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:598: in run answer = await dns.asyncresolver.resolve_at( dns/asyncresolver.py:463: in resolve_at res = await make_resolver_at(where, port, family, resolver) dns/asyncresolver.py:421: in make_resolver_at resolver = get_default_resolver() dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration __________________________ AsyncTests.testResolveName __________________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveName(self): async def run1(): return await dns.asyncresolver.resolve_name("dns.google.") > answers = self.async_run(run1) tests/test_async.py:203: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:201: in run1 return await dns.asyncresolver.resolve_name("dns.google.") dns/asyncresolver.py:338: in resolve_name return await get_default_resolver().resolve_name(name, family, **kwargs) dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration __________________________ AsyncTests.testResolverDOH __________________________ self = @unittest.skipIf(not dns.query._have_httpx, "httpx not available") def testResolverDOH(self): async def run(): res = dns.asyncresolver.Resolver(configure=False) res.nameservers = ["https://dns.google/dns-query"] answer = await res.resolve("dns.google", "A", backend=self.backend) seen = set([rdata.address for rdata in answer]) self.assertTrue("8.8.8.8" in seen) self.assertTrue("8.8.4.4" in seen) > self.async_run(run) tests/test_async.py:583: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:578: in run answer = await res.resolve("dns.google", "A", backend=self.backend) dns/asyncresolver.py:89: in resolve timeout = self._compute_timeout(start, lifetime, resolution.errors) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = start = 1701221232.8091092, lifetime = 5.0 errors = [('https://dns.google/dns-query', True, 443, NoResolverConfiguration('cannot open /etc/resolv.conf'), None), ('https:/...f'), None), ('https://dns.google/dns-query', True, 443, NoResolverConfiguration('cannot open /etc/resolv.conf'), None)] def _compute_timeout( self, start: float, lifetime: Optional[float] = None, errors: Optional[List[ErrorTuple]] = None, ) -> float: lifetime = self.lifetime if lifetime is None else lifetime now = time.time() duration = now - start if errors is None: errors = [] if duration < 0: if duration < -1: # Time going backwards is bad. Just give up. raise LifetimeTimeout(timeout=duration, errors=errors) else: # Time went backwards, but only a little. This can # happen, e.g. under vmware with older linux kernels. # Pretend it didn't happen. duration = 0 if duration >= lifetime: > raise LifetimeTimeout(timeout=duration, errors=errors) E dns.resolver.LifetimeTimeout: The resolution lifetime expired after 5.113 seconds: Server https://dns.google/dns-query answered cannot open /etc/resolv.conf; Server https://dns.google/dns-query answered cannot open /etc/resolv.conf; Server https://dns.google/dns-query answered cannot open /etc/resolv.conf; Server https://dns.google/dns-query answered cannot open /etc/resolv.conf; Server https://dns.google/dns-query answered cannot open /etc/resolv.conf; Server https://dns.google/dns-query answered cannot open /etc/resolv.conf dns/resolver.py:1075: LifetimeTimeout _________________________ AsyncTests.testZoneForName1 __________________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName1(self): async def run(): name = dns.name.from_text("www.dnspython.org.") return await dns.asyncresolver.zone_for_name(name) ezname = dns.name.from_text("dnspython.org.") > zname = self.async_run(run) tests/test_async.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:273: in run return await dns.asyncresolver.zone_for_name(name) dns/asyncresolver.py:377: in zone_for_name resolver = get_default_resolver() dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _________________________ AsyncTests.testZoneForName2 __________________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName2(self): async def run(): name = dns.name.from_text("a.b.www.dnspython.org.") return await dns.asyncresolver.zone_for_name(name) ezname = dns.name.from_text("dnspython.org.") > zname = self.async_run(run) tests/test_async.py:285: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:282: in run return await dns.asyncresolver.zone_for_name(name) dns/asyncresolver.py:377: in zone_for_name resolver = get_default_resolver() dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _________________________ AsyncTests.testZoneForName3 __________________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName3(self): async def run(): name = dns.name.from_text("dnspython.org.") return await dns.asyncresolver.zone_for_name(name) ezname = dns.name.from_text("dnspython.org.") > zname = self.async_run(run) tests/test_async.py:294: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:291: in run return await dns.asyncresolver.zone_for_name(name) dns/asyncresolver.py:377: in zone_for_name resolver = get_default_resolver() dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _________________________ AsyncTests.testZoneForName4 __________________________ def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName4(self): def bad(): name = dns.name.from_text("dnspython.org", None) async def run(): return await dns.asyncresolver.zone_for_name(name) self.async_run(run) > self.assertRaises(dns.resolver.NotAbsolute, bad) tests/test_async.py:306: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:304: in bad self.async_run(run) tests/test_async.py:180: in async_run return asyncio.run(afunc()) /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() tests/test_async.py:302: in run return await dns.asyncresolver.zone_for_name(name) dns/asyncresolver.py:377: in zone_for_name resolver = get_default_resolver() dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ____________________ TrioAsyncTests.testCanonicalNameCNAME _____________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testCanonicalNameCNAME(self): name = dns.name.from_text("www.dnspython.org") cname = dns.name.from_text("dmfrjf4ips8xa.cloudfront.net") async def run(): return await dns.asyncresolver.canonical_name(name) > self.assertEqual(self.async_run(run), cname) tests/test_async.py:258: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:256: in run return await dns.asyncresolver.canonical_name(name) dns/asyncresolver.py:348: in canonical_name return await get_default_resolver().canonical_name(name) dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ___________________ TrioAsyncTests.testCanonicalNameDangling ___________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(_systemd_resolved_present, "systemd-resolved in use") def testCanonicalNameDangling(self): name = dns.name.from_text("dangling-cname.dnspython.org") cname = dns.name.from_text("dangling-target.dnspython.org") async def run(): return await dns.asyncresolver.canonical_name(name) > self.assertEqual(self.async_run(run), cname) tests/test_async.py:268: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:266: in run return await dns.asyncresolver.canonical_name(name) dns/asyncresolver.py:348: in canonical_name return await get_default_resolver().canonical_name(name) dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ___________________ TrioAsyncTests.testCanonicalNameNoCNAME ____________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testCanonicalNameNoCNAME(self): cname = dns.name.from_text("www.google.com") async def run(): return await dns.asyncresolver.canonical_name("www.google.com") > self.assertEqual(self.async_run(run), cname) tests/test_async.py:249: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:247: in run return await dns.asyncresolver.canonical_name("www.google.com") dns/asyncresolver.py:348: in canonical_name return await get_default_resolver().canonical_name(name) dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _______________________ TrioAsyncTests.testDOHGetRequest _______________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not dns.query._have_httpx, "httpx not available") def testDOHGetRequest(self): async def run(): nameserver_url = random.choice(KNOWN_ANYCAST_DOH_RESOLVER_URLS) q = dns.message.make_query("example.com.", dns.rdatatype.A) r = await dns.asyncquery.https( q, nameserver_url, post=False, timeout=4, family=family ) self.assertTrue(q.is_response(r)) > self.async_run(run) tests/test_async.py:542: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:537: in run r = await dns.asyncquery.https( dns/asyncquery.py:538: in https transport = backend.get_transport_class()( dns/_trio_backend.py:174: in __init__ resolver = dns.asyncresolver.Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ____________________ TrioAsyncTests.testDOHGetRequestHttp1 _____________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not dns.query._have_httpx, "httpx not available") def testDOHGetRequestHttp1(self): async def run(): saved_have_http2 = dns.query._have_http2 try: dns.query._have_http2 = False nameserver_url = random.choice(KNOWN_ANYCAST_DOH_RESOLVER_URLS) q = dns.message.make_query("example.com.", dns.rdatatype.A) r = await dns.asyncquery.https( q, nameserver_url, post=False, timeout=4, family=family ) self.assertTrue(q.is_response(r)) finally: dns.query._have_http2 = saved_have_http2 > self.async_run(run) tests/test_async.py:559: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:552: in run r = await dns.asyncquery.https( dns/asyncquery.py:538: in https transport = backend.get_transport_class()( dns/_trio_backend.py:174: in __init__ resolver = dns.asyncresolver.Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ______________________ TrioAsyncTests.testDOHPostRequest _______________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not dns.query._have_httpx, "httpx not available") def testDOHPostRequest(self): async def run(): nameserver_url = random.choice(KNOWN_ANYCAST_DOH_RESOLVER_URLS) q = dns.message.make_query("example.com.", dns.rdatatype.A) r = await dns.asyncquery.https( q, nameserver_url, post=True, timeout=4, family=family ) self.assertTrue(q.is_response(r)) > self.async_run(run) tests/test_async.py:571: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:566: in run r = await dns.asyncquery.https( dns/asyncquery.py:538: in https transport = backend.get_transport_class()( dns/_trio_backend.py:174: in __init__ resolver = dns.asyncresolver.Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _________________________ TrioAsyncTests.testQueryTLS __________________________ self = @unittest.skipIf(not _ssl_available, "SSL not available") def testQueryTLS(self): for address in query_addresses: qname = dns.name.from_text("dns.google.") async def run(): q = dns.message.make_query(qname, dns.rdatatype.A) return await dns.asyncquery.tls(q, address, timeout=2) > response = self.async_run(run) tests/test_async.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:400: in run return await dns.asyncquery.tls(q, address, timeout=2) dns/asyncquery.py:452: in tls cm = await backend.make_socket( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = af = , socktype = proto = 0, source = None, destination = ('8.8.8.8', 853), timeout = 2 ssl_context = , server_hostname = None async def make_socket( self, af, socktype, proto=0, source=None, destination=None, timeout=None, ssl_context=None, server_hostname=None, ): s = trio.socket.socket(af, socktype, proto) stream = None try: if source: await s.bind(_lltuple(source, af)) if socktype == socket.SOCK_STREAM: connected = False with _maybe_timeout(timeout): await s.connect(_lltuple(destination, af)) connected = True if not connected: > raise dns.exception.Timeout( timeout=timeout ) # lgtm[py/unreachable-statement] E dns.exception.Timeout: The DNS operation timed out after 2.000 seconds dns/_trio_backend.py:210: Timeout ____________________ TrioAsyncTests.testQueryTLSWithContext ____________________ self = @unittest.skipIf(not _ssl_available, "SSL not available") def testQueryTLSWithContext(self): for address in query_addresses: qname = dns.name.from_text("dns.google.") async def run(): ssl_context = ssl.create_default_context() ssl_context.check_hostname = True q = dns.message.make_query(qname, dns.rdatatype.A) return await dns.asyncquery.tls( q, address, timeout=2, ssl_context=ssl_context ) > response = self.async_run(run) tests/test_async.py:424: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:420: in run return await dns.asyncquery.tls( dns/asyncquery.py:452: in tls cm = await backend.make_socket( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = af = , socktype = proto = 0, source = None, destination = ('8.8.8.8', 853), timeout = 2 ssl_context = , server_hostname = None async def make_socket( self, af, socktype, proto=0, source=None, destination=None, timeout=None, ssl_context=None, server_hostname=None, ): s = trio.socket.socket(af, socktype, proto) stream = None try: if source: await s.bind(_lltuple(source, af)) if socktype == socket.SOCK_STREAM: connected = False with _maybe_timeout(timeout): await s.connect(_lltuple(destination, af)) connected = True if not connected: > raise dns.exception.Timeout( timeout=timeout ) # lgtm[py/unreachable-statement] E dns.exception.Timeout: The DNS operation timed out after 2.000 seconds dns/_trio_backend.py:210: Timeout ____________________ TrioAsyncTests.testQueryTLSWithSocket _____________________ self = @unittest.skipIf(not _ssl_available, "SSL not available") def testQueryTLSWithSocket(self): for address in query_addresses: qname = dns.name.from_text("dns.google.") async def run(): ssl_context = ssl.create_default_context() ssl_context.check_hostname = False async with await self.backend.make_socket( dns.inet.af_for_address(address), socket.SOCK_STREAM, 0, None, (address, 853), 2, ssl_context, None, ) as s: # for basic coverage await s.getsockname() q = dns.message.make_query(qname, dns.rdatatype.A) return await dns.asyncquery.tls(q, "8.8.8.8", sock=s, timeout=2) > response = self.async_run(run) tests/test_async.py:456: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:441: in run async with await self.backend.make_socket( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = af = , socktype = proto = 0, source = None, destination = ('8.8.8.8', 853), timeout = 2 ssl_context = , server_hostname = None async def make_socket( self, af, socktype, proto=0, source=None, destination=None, timeout=None, ssl_context=None, server_hostname=None, ): s = trio.socket.socket(af, socktype, proto) stream = None try: if source: await s.bind(_lltuple(source, af)) if socktype == socket.SOCK_STREAM: connected = False with _maybe_timeout(timeout): await s.connect(_lltuple(destination, af)) connected = True if not connected: > raise dns.exception.Timeout( timeout=timeout ) # lgtm[py/unreachable-statement] E dns.exception.Timeout: The DNS operation timed out after 2.000 seconds dns/_trio_backend.py:210: Timeout __________________________ TrioAsyncTests.testResolve __________________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolve(self): async def run(): answer = await dns.asyncresolver.resolve("dns.google.", "A") return set([rdata.address for rdata in answer]) > seen = self.async_run(run) tests/test_async.py:187: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:184: in run answer = await dns.asyncresolver.resolve("dns.google.", "A") dns/asyncresolver.py:303: in resolve return await get_default_resolver().resolve( dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ______________________ TrioAsyncTests.testResolveAddress _______________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveAddress(self): async def run(): return await dns.asyncresolver.resolve_address("8.8.8.8") > answer = self.async_run(run) tests/test_async.py:195: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:193: in run return await dns.asyncresolver.resolve_address("8.8.8.8") dns/asyncresolver.py:326: in resolve_address return await get_default_resolver().resolve_address(ipaddr, *args, **kwargs) dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _____________________ TrioAsyncTests.testResolveAtAddress ______________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not tests.util.have_ipv4(), "IPv4 not reachable") def testResolveAtAddress(self): async def run(): answer = await dns.asyncresolver.resolve_at("8.8.8.8", "dns.google.", "A") seen = set([rdata.address for rdata in answer]) self.assertIn("8.8.8.8", seen) self.assertIn("8.8.4.4", seen) > self.async_run(run) tests/test_async.py:593: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:588: in run answer = await dns.asyncresolver.resolve_at("8.8.8.8", "dns.google.", "A") dns/asyncresolver.py:463: in resolve_at res = await make_resolver_at(where, port, family, resolver) dns/asyncresolver.py:421: in make_resolver_at resolver = get_default_resolver() dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _______________________ TrioAsyncTests.testResolveAtName _______________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not tests.util.have_ipv4(), "IPv4 not reachable") def testResolveAtName(self): async def run(): answer = await dns.asyncresolver.resolve_at( "dns.google", "dns.google.", "A", family=socket.AF_INET ) seen = set([rdata.address for rdata in answer]) self.assertIn("8.8.8.8", seen) self.assertIn("8.8.4.4", seen) > self.async_run(run) tests/test_async.py:605: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:598: in run answer = await dns.asyncresolver.resolve_at( dns/asyncresolver.py:463: in resolve_at res = await make_resolver_at(where, port, family, resolver) dns/asyncresolver.py:421: in make_resolver_at resolver = get_default_resolver() dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ________________________ TrioAsyncTests.testResolveName ________________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveName(self): async def run1(): return await dns.asyncresolver.resolve_name("dns.google.") > answers = self.async_run(run1) tests/test_async.py:203: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:201: in run1 return await dns.asyncresolver.resolve_name("dns.google.") dns/asyncresolver.py:338: in resolve_name return await get_default_resolver().resolve_name(name, family, **kwargs) dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ________________________ TrioAsyncTests.testResolverDOH ________________________ self = @unittest.skipIf(not dns.query._have_httpx, "httpx not available") def testResolverDOH(self): async def run(): res = dns.asyncresolver.Resolver(configure=False) res.nameservers = ["https://dns.google/dns-query"] answer = await res.resolve("dns.google", "A", backend=self.backend) seen = set([rdata.address for rdata in answer]) self.assertTrue("8.8.8.8" in seen) self.assertTrue("8.8.4.4" in seen) > self.async_run(run) tests/test_async.py:583: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:578: in run answer = await res.resolve("dns.google", "A", backend=self.backend) dns/asyncresolver.py:89: in resolve timeout = self._compute_timeout(start, lifetime, resolution.errors) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = start = 1701221253.8674874, lifetime = 5.0 errors = [('https://dns.google/dns-query', True, 443, NoResolverConfiguration('cannot open /etc/resolv.conf'), None), ('https:/...f'), None), ('https://dns.google/dns-query', True, 443, NoResolverConfiguration('cannot open /etc/resolv.conf'), None)] def _compute_timeout( self, start: float, lifetime: Optional[float] = None, errors: Optional[List[ErrorTuple]] = None, ) -> float: lifetime = self.lifetime if lifetime is None else lifetime now = time.time() duration = now - start if errors is None: errors = [] if duration < 0: if duration < -1: # Time going backwards is bad. Just give up. raise LifetimeTimeout(timeout=duration, errors=errors) else: # Time went backwards, but only a little. This can # happen, e.g. under vmware with older linux kernels. # Pretend it didn't happen. duration = 0 if duration >= lifetime: > raise LifetimeTimeout(timeout=duration, errors=errors) E dns.resolver.LifetimeTimeout: The resolution lifetime expired after 5.115 seconds: Server https://dns.google/dns-query answered cannot open /etc/resolv.conf; Server https://dns.google/dns-query answered cannot open /etc/resolv.conf; Server https://dns.google/dns-query answered cannot open /etc/resolv.conf; Server https://dns.google/dns-query answered cannot open /etc/resolv.conf; Server https://dns.google/dns-query answered cannot open /etc/resolv.conf; Server https://dns.google/dns-query answered cannot open /etc/resolv.conf dns/resolver.py:1075: LifetimeTimeout _______________________ TrioAsyncTests.testZoneForName1 ________________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName1(self): async def run(): name = dns.name.from_text("www.dnspython.org.") return await dns.asyncresolver.zone_for_name(name) ezname = dns.name.from_text("dnspython.org.") > zname = self.async_run(run) tests/test_async.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:273: in run return await dns.asyncresolver.zone_for_name(name) dns/asyncresolver.py:377: in zone_for_name resolver = get_default_resolver() dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _______________________ TrioAsyncTests.testZoneForName2 ________________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName2(self): async def run(): name = dns.name.from_text("a.b.www.dnspython.org.") return await dns.asyncresolver.zone_for_name(name) ezname = dns.name.from_text("dnspython.org.") > zname = self.async_run(run) tests/test_async.py:285: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:282: in run return await dns.asyncresolver.zone_for_name(name) dns/asyncresolver.py:377: in zone_for_name resolver = get_default_resolver() dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _______________________ TrioAsyncTests.testZoneForName3 ________________________ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName3(self): async def run(): name = dns.name.from_text("dnspython.org.") return await dns.asyncresolver.zone_for_name(name) ezname = dns.name.from_text("dnspython.org.") > zname = self.async_run(run) tests/test_async.py:294: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:687: in async_run return trio.run(afunc) tests/test_async.py:291: in run return await dns.asyncresolver.zone_for_name(name) dns/asyncresolver.py:377: in zone_for_name resolver = get_default_resolver() dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _______________________ TrioAsyncTests.testZoneForName4 ________________________ def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName4(self): def bad(): name = dns.name.from_text("dnspython.org", None) async def run(): return await dns.asyncresolver.zone_for_name(name) self.async_run(run) > self.assertRaises(dns.resolver.NotAbsolute, bad) tests/test_async.py:306: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_async.py:304: in bad self.async_run(run) tests/test_async.py:687: in async_run return trio.run(afunc) /usr/lib/python3.12/site-packages/trio/_core/_run.py:2010: in run raise runner.main_task_outcome.error tests/test_async.py:302: in run return await dns.asyncresolver.zone_for_name(name) dns/asyncresolver.py:377: in zone_for_name resolver = get_default_resolver() dns/asyncresolver.py:266: in get_default_resolver reset_default_resolver() dns/asyncresolver.py:279: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _____________________________ test_basic_ddr_sync ______________________________ @pytest.mark.skipif( not tests.util.is_internet_reachable(), reason="Internet not reachable" ) def test_basic_ddr_sync(): for nameserver in ["1.1.1.1", "8.8.8.8"]: res = dns.resolver.Resolver(configure=False) res.nameservers = [nameserver] res.try_ddr() for nameserver in res.nameservers: > assert isinstance(nameserver, dns.nameserver.Nameserver) E AssertionError: assert False E + where False = isinstance('1.1.1.1', ) E + where = .Nameserver E + where = dns.nameserver tests/test_ddr.py:25: AssertionError _____________________________ test_basic_ddr_async _____________________________ @pytest.mark.skipif( not tests.util.is_internet_reachable(), reason="Internet not reachable" ) def test_basic_ddr_async(): async def run(): dns.asyncbackend._default_backend = None for nameserver in ["1.1.1.1", "8.8.8.8"]: res = dns.asyncresolver.Resolver(configure=False) res.nameservers = [nameserver] await res.try_ddr() for nameserver in res.nameservers: assert isinstance(nameserver, dns.nameserver.Nameserver) assert nameserver.kind() != "Do53" > asyncio.run(run()) tests/test_ddr.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.12/asyncio/runners.py:194: in run return runner.run(main) /usr/lib64/python3.12/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.12/asyncio/base_events.py:664: in run_until_complete return future.result() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ async def run(): dns.asyncbackend._default_backend = None for nameserver in ["1.1.1.1", "8.8.8.8"]: res = dns.asyncresolver.Resolver(configure=False) res.nameservers = [nameserver] await res.try_ddr() for nameserver in res.nameservers: > assert isinstance(nameserver, dns.nameserver.Nameserver) E AssertionError: assert False E + where False = isinstance('1.1.1.1', ) E + where = .Nameserver E + where = dns.nameserver tests/test_ddr.py:40: AssertionError _______________ DNSOverHTTPSTestCaseHttpx.test_build_url_from_ip _______________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def test_build_url_from_ip(self): self.assertTrue(resolver_v4_addresses or resolver_v6_addresses) if resolver_v4_addresses: nameserver_ip = random.choice(resolver_v4_addresses) q = dns.message.make_query("example.com.", dns.rdatatype.A) # For some reason Google's DNS over HTTPS fails when you POST to # https://8.8.8.8/dns-query # So we're just going to do GET requests here > r = dns.query.https( q, nameserver_ip, session=self.session, post=False, timeout=4 ) tests/test_doh.py:137: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/query.py:459: in https transport = _HTTPTransport( dns/query.py:144: in __init__ resolver = dns.resolver.Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration __________________ DNSOverHTTPSTestCaseHttpx.test_get_request __________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def test_get_request(self): nameserver_url = random.choice(KNOWN_ANYCAST_DOH_RESOLVER_URLS) q = dns.message.make_query("example.com.", dns.rdatatype.A) > r = dns.query.https( q, nameserver_url, session=self.session, post=False, timeout=4, family=family, ) tests/test_doh.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/query.py:459: in https transport = _HTTPTransport( dns/query.py:144: in __init__ resolver = dns.resolver.Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _______________ DNSOverHTTPSTestCaseHttpx.test_get_request_http1 _______________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def test_get_request_http1(self): saved_have_http2 = dns.query._have_http2 try: dns.query._have_http2 = False nameserver_url = random.choice(KNOWN_ANYCAST_DOH_RESOLVER_URLS) q = dns.message.make_query("example.com.", dns.rdatatype.A) > r = dns.query.https( q, nameserver_url, session=self.session, post=False, timeout=4, family=family, ) tests/test_doh.py:104: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/query.py:459: in https transport = _HTTPTransport( dns/query.py:144: in __init__ resolver = dns.resolver.Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration __________________ DNSOverHTTPSTestCaseHttpx.test_new_session __________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def test_new_session(self): nameserver_url = random.choice(KNOWN_ANYCAST_DOH_RESOLVER_URLS) q = dns.message.make_query("example.com.", dns.rdatatype.A) > r = dns.query.https(q, nameserver_url, timeout=4) tests/test_doh.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/query.py:459: in https transport = _HTTPTransport( dns/query.py:144: in __init__ resolver = dns.resolver.Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration __________________ DNSOverHTTPSTestCaseHttpx.test_padded_get ___________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def test_padded_get(self): nameserver_url = random.choice(KNOWN_PAD_AWARE_DOH_RESOLVER_URLS) q = dns.message.make_query("example.com.", dns.rdatatype.A, use_edns=0, pad=128) > r = dns.query.https( q, nameserver_url, session=self.session, post=False, timeout=4 ) tests/test_doh.py:191: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/query.py:459: in https transport = _HTTPTransport( dns/query.py:144: in __init__ resolver = dns.resolver.Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _________________ DNSOverHTTPSTestCaseHttpx.test_post_request __________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def test_post_request(self): nameserver_url = random.choice(KNOWN_ANYCAST_DOH_RESOLVER_URLS) q = dns.message.make_query("example.com.", dns.rdatatype.A) > r = dns.query.https( q, nameserver_url, session=self.session, post=True, timeout=4, family=family, ) tests/test_doh.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/query.py:459: in https transport = _HTTPTransport( dns/query.py:144: in __init__ resolver = dns.resolver.Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ___________________ DNSOverHTTPSTestCaseHttpx.test_resolver ____________________ self = def test_resolver(self): res = dns.resolver.Resolver(configure=False) res.nameservers = ["https://dns.google/dns-query"] > answer = res.resolve("dns.google", "A") tests/test_doh.py:183: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1321: in resolve timeout = self._compute_timeout(start, lifetime, resolution.errors) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = start = 1701221301.8476617, lifetime = 5.0 errors = [('https://dns.google/dns-query', True, 443, NoResolverConfiguration('cannot open /etc/resolv.conf'), None), ('https:/...f'), None), ('https://dns.google/dns-query', True, 443, NoResolverConfiguration('cannot open /etc/resolv.conf'), None)] def _compute_timeout( self, start: float, lifetime: Optional[float] = None, errors: Optional[List[ErrorTuple]] = None, ) -> float: lifetime = self.lifetime if lifetime is None else lifetime now = time.time() duration = now - start if errors is None: errors = [] if duration < 0: if duration < -1: # Time going backwards is bad. Just give up. raise LifetimeTimeout(timeout=duration, errors=errors) else: # Time went backwards, but only a little. This can # happen, e.g. under vmware with older linux kernels. # Pretend it didn't happen. duration = 0 if duration >= lifetime: > raise LifetimeTimeout(timeout=duration, errors=errors) E dns.resolver.LifetimeTimeout: The resolution lifetime expired after 5.107 seconds: Server https://dns.google/dns-query answered cannot open /etc/resolv.conf; Server https://dns.google/dns-query answered cannot open /etc/resolv.conf; Server https://dns.google/dns-query answered cannot open /etc/resolv.conf; Server https://dns.google/dns-query answered cannot open /etc/resolv.conf; Server https://dns.google/dns-query answered cannot open /etc/resolv.conf; Server https://dns.google/dns-query answered cannot open /etc/resolv.conf dns/resolver.py:1075: LifetimeTimeout ___________________________ QueryTests.testQueryTLS ____________________________ self = @unittest.skipUnless(have_ssl, "No SSL support") def testQueryTLS(self): for address in query_addresses: qname = dns.name.from_text("dns.google.") q = dns.message.make_query(qname, dns.rdatatype.A) > response = dns.query.tls(q, address, timeout=2) tests/test_query.py:134: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/query.py:1106: in tls _connect(s, destination, expiration) dns/query.py:932: in _connect _wait_for_writable(s, expiration) dns/query.py:269: in _wait_for_writable _wait_for(s, False, True, True, expiration) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fd = , readable = False writable = True, _ = True, expiration = 1701221312.2636123 def _wait_for(fd, readable, writable, _, expiration): # Use the selected selector class to wait for any of the specified # events. An "expiration" absolute time is converted into a relative # timeout. # # The unused parameter is 'error', which is always set when # selecting for read or write, and we have no error-only selects. if readable and isinstance(fd, ssl.SSLSocket) and fd.pending() > 0: return True sel = _selector_class() events = 0 if readable: events |= selectors.EVENT_READ if writable: events |= selectors.EVENT_WRITE if events: sel.register(fd, events) if expiration is None: timeout = None else: timeout = expiration - time.time() if timeout <= 0.0: raise dns.exception.Timeout if not sel.select(timeout): > raise dns.exception.Timeout E dns.exception.Timeout: The DNS operation timed out. dns/query.py:241: Timeout ______________________ QueryTests.testQueryTLSWithContext ______________________ self = @unittest.skipUnless(have_ssl, "No SSL support") def testQueryTLSWithContext(self): for address in query_addresses: qname = dns.name.from_text("dns.google.") q = dns.message.make_query(qname, dns.rdatatype.A) ssl_context = ssl.create_default_context() ssl_context.check_hostname = False > response = dns.query.tls(q, address, timeout=2, ssl_context=ssl_context) tests/test_query.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/query.py:1106: in tls _connect(s, destination, expiration) dns/query.py:932: in _connect _wait_for_writable(s, expiration) dns/query.py:269: in _wait_for_writable _wait_for(s, False, True, True, expiration) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fd = , readable = False writable = True, _ = True, expiration = 1701221314.6321557 def _wait_for(fd, readable, writable, _, expiration): # Use the selected selector class to wait for any of the specified # events. An "expiration" absolute time is converted into a relative # timeout. # # The unused parameter is 'error', which is always set when # selecting for read or write, and we have no error-only selects. if readable and isinstance(fd, ssl.SSLSocket) and fd.pending() > 0: return True sel = _selector_class() events = 0 if readable: events |= selectors.EVENT_READ if writable: events |= selectors.EVENT_WRITE if events: sel.register(fd, events) if expiration is None: timeout = None else: timeout = expiration - time.time() if timeout <= 0.0: raise dns.exception.Timeout if not sel.select(timeout): > raise dns.exception.Timeout E dns.exception.Timeout: The DNS operation timed out. dns/query.py:241: Timeout ______________________ QueryTests.testQueryTLSWithSocket _______________________ self = @unittest.skipUnless(have_ssl, "No SSL support") def testQueryTLSWithSocket(self): for address in query_addresses: with socket.socket( dns.inet.af_for_address(address), socket.SOCK_STREAM ) as base_s: ll = dns.inet.low_level_address_tuple((address, 853)) base_s.settimeout(2) > base_s.connect(ll) E TimeoutError: timed out tests/test_query.py:167: TimeoutError ______________________ QueryTests.testQueryTLSwithPadding ______________________ self = @unittest.skipUnless(have_ssl, "No SSL support") def testQueryTLSwithPadding(self): for address in query_addresses: qname = dns.name.from_text("dns.google.") q = dns.message.make_query(qname, dns.rdatatype.A, use_edns=0, pad=128) > response = dns.query.tls(q, address, timeout=2) tests/test_query.py:190: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/query.py:1106: in tls _connect(s, destination, expiration) dns/query.py:932: in _connect _wait_for_writable(s, expiration) dns/query.py:269: in _wait_for_writable _wait_for(s, False, True, True, expiration) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fd = , readable = False writable = True, _ = True, expiration = 1701221318.9841707 def _wait_for(fd, readable, writable, _, expiration): # Use the selected selector class to wait for any of the specified # events. An "expiration" absolute time is converted into a relative # timeout. # # The unused parameter is 'error', which is always set when # selecting for read or write, and we have no error-only selects. if readable and isinstance(fd, ssl.SSLSocket) and fd.pending() > 0: return True sel = _selector_class() events = 0 if readable: events |= selectors.EVENT_READ if writable: events |= selectors.EVENT_WRITE if events: sel.register(fd, events) if expiration is None: timeout = None else: timeout = expiration - time.time() if timeout <= 0.0: raise dns.exception.Timeout if not sel.select(timeout): > raise dns.exception.Timeout E dns.exception.Timeout: The DNS operation timed out. dns/query.py:241: Timeout ___________________ LiveResolverTests.testCanonicalNameCNAME ___________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testCanonicalNameCNAME(self): name = dns.name.from_text("www.dnspython.org") cname = dns.name.from_text("dmfrjf4ips8xa.cloudfront.net") > self.assertEqual(dns.resolver.canonical_name(name), cname) tests/test_resolver.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1640: in canonical_name return get_default_resolver().canonical_name(name) dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _________________ LiveResolverTests.testCanonicalNameDangling __________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(_systemd_resolved_present, "systemd-resolved in use") def testCanonicalNameDangling(self): name = dns.name.from_text("dangling-cname.dnspython.org") cname = dns.name.from_text("dangling-target.dnspython.org") > self.assertEqual(dns.resolver.canonical_name(name), cname) tests/test_resolver.py:799: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1640: in canonical_name return get_default_resolver().canonical_name(name) dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration __________________ LiveResolverTests.testCanonicalNameNoCNAME __________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testCanonicalNameNoCNAME(self): cname = dns.name.from_text("www.google.com") > self.assertEqual(dns.resolver.canonical_name("www.google.com"), cname) tests/test_resolver.py:788: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1640: in canonical_name return get_default_resolver().canonical_name(name) dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ________________________ LiveResolverTests.testResolve _________________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolve(self): > answer = dns.resolver.resolve("dns.google.", "A") tests/test_resolver.py:653: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1565: in resolve return get_default_resolver().resolve( dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _____________________ LiveResolverTests.testResolveAddress _____________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveAddress(self): > answer = dns.resolver.resolve_address("8.8.8.8") tests/test_resolver.py:665: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1618: in resolve_address return get_default_resolver().resolve_address(ipaddr, *args, **kwargs) dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ____________________ LiveResolverTests.testResolveAtAddress ____________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not tests.util.have_ipv4(), "IPv4 not reachable") def testResolveAtAddress(self): > answer = dns.resolver.resolve_at("8.8.8.8", "dns.google.", "A") tests/test_resolver.py:772: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1802: in resolve_at return make_resolver_at(where, port, family, resolver).resolve( dns/resolver.py:1762: in make_resolver_at resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _____________________ LiveResolverTests.testResolveAtName ______________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not tests.util.have_ipv4(), "IPv4 not reachable") def testResolveAtName(self): > answer = dns.resolver.resolve_at( "dns.google", "dns.google.", "A", family=socket.AF_INET ) tests/test_resolver.py:779: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1802: in resolve_at return make_resolver_at(where, port, family, resolver).resolve( dns/resolver.py:1762: in make_resolver_at resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ___________________ LiveResolverTests.testResolveEdnsOptions ___________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = message_use_edns_mock = @patch.object(dns.message.Message, "use_edns") def testResolveEdnsOptions(self, message_use_edns_mock): > resolver = dns.resolver.Resolver() tests/test_resolver.py:698: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ____________________ LiveResolverTests.testResolveNXDOMAIN _____________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveNXDOMAIN(self): qname = dns.name.from_text("nxdomain.dnspython.org") qclass = dns.rdataclass.from_text("IN") qtype = dns.rdatatype.from_text("A") def bad(): answer = dns.resolver.resolve(qname, qtype) try: > dns.resolver.resolve(qname, qtype) tests/test_resolver.py:731: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1565: in resolve return get_default_resolver().resolve( dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ______________________ LiveResolverTests.testResolveName _______________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveName(self): > answers = dns.resolver.resolve_name("dns.google.") tests/test_resolver.py:670: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1630: in resolve_name return get_default_resolver().resolve_name(name, family, **kwargs) dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration __________________ LiveResolverTests.testResolveNodataAnswer ___________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveNodataAnswer(self): qname = dns.name.from_text("dnspython.org") qclass = dns.rdataclass.from_text("IN") qtype = dns.rdatatype.from_text("SRV") > answer = dns.resolver.resolve(qname, qtype, raise_on_no_answer=False) tests/test_resolver.py:714: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1565: in resolve return get_default_resolver().resolve( dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _________________ LiveResolverTests.testResolveNodataException _________________ def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveNodataException(self): def bad(): dns.resolver.resolve("dnspython.org.", "SRV") > self.assertRaises(dns.resolver.NoAnswer, bad) tests/test_resolver.py:708: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_resolver.py:706: in bad dns.resolver.resolve("dnspython.org.", "SRV") dns/resolver.py:1565: in resolve return get_default_resolver().resolve( dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _______________________ LiveResolverTests.testResolveTCP _______________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveTCP(self): > answer = dns.resolver.resolve("dns.google.", "A", tcp=True) tests/test_resolver.py:659: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1565: in resolve return get_default_resolver().resolve( dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _____________________ LiveResolverTests.testTLSNameserver ______________________ self = @unittest.skipIf(not tests.util.have_ipv4(), "IPv4 not reachable") def testTLSNameserver(self): res = dns.resolver.Resolver(configure=False) res.nameservers = [dns.nameserver.DoTNameserver("8.8.8.8", 853)] > answer = res.resolve("dns.google.", "A") tests/test_resolver.py:753: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1321: in resolve timeout = self._compute_timeout(start, lifetime, resolution.errors) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = start = 1701221329.5933685, lifetime = 5.0 errors = [('DoT:8.8.8.8@853', False, 853, Timeout('The DNS operation timed out.'), None), ('DoT:8.8.8.8@853', False, 853, Timeout('The DNS operation timed out.'), None), ('DoT:8.8.8.8@853', False, 853, Timeout('The DNS operation timed out.'), None)] def _compute_timeout( self, start: float, lifetime: Optional[float] = None, errors: Optional[List[ErrorTuple]] = None, ) -> float: lifetime = self.lifetime if lifetime is None else lifetime now = time.time() duration = now - start if errors is None: errors = [] if duration < 0: if duration < -1: # Time going backwards is bad. Just give up. raise LifetimeTimeout(timeout=duration, errors=errors) else: # Time went backwards, but only a little. This can # happen, e.g. under vmware with older linux kernels. # Pretend it didn't happen. duration = 0 if duration >= lifetime: > raise LifetimeTimeout(timeout=duration, errors=errors) E dns.resolver.LifetimeTimeout: The resolution lifetime expired after 5.402 seconds: Server DoT:8.8.8.8@853 answered The DNS operation timed out.; Server DoT:8.8.8.8@853 answered The DNS operation timed out.; Server DoT:8.8.8.8@853 answered The DNS operation timed out. dns/resolver.py:1075: LifetimeTimeout ______________________ LiveResolverTests.testZoneForName1 ______________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName1(self): name = dns.name.from_text("www.dnspython.org.") ezname = dns.name.from_text("dnspython.org.") > zname = dns.resolver.zone_for_name(name) tests/test_resolver.py:631: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1688: in zone_for_name resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ______________________ LiveResolverTests.testZoneForName2 ______________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName2(self): name = dns.name.from_text("a.b.www.dnspython.org.") ezname = dns.name.from_text("dnspython.org.") > zname = dns.resolver.zone_for_name(name) tests/test_resolver.py:637: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1688: in zone_for_name resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ______________________ LiveResolverTests.testZoneForName3 ______________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName3(self): ezname = dns.name.from_text("dnspython.org.") > zname = dns.resolver.zone_for_name("dnspython.org.") tests/test_resolver.py:642: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1688: in zone_for_name resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ______________________ LiveResolverTests.testZoneForName4 ______________________ def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName4(self): def bad(): name = dns.name.from_text("dnspython.org", None) dns.resolver.zone_for_name(name) > self.assertRaises(dns.resolver.NotAbsolute, bad) tests/test_resolver.py:650: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_resolver.py:648: in bad dns.resolver.zone_for_name(name) dns/resolver.py:1688: in zone_for_name resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ________________ SelectResolverTestCase.testCanonicalNameCNAME _________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testCanonicalNameCNAME(self): name = dns.name.from_text("www.dnspython.org") cname = dns.name.from_text("dmfrjf4ips8xa.cloudfront.net") > self.assertEqual(dns.resolver.canonical_name(name), cname) tests/test_resolver.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1640: in canonical_name return get_default_resolver().canonical_name(name) dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _______________ SelectResolverTestCase.testCanonicalNameDangling _______________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(_systemd_resolved_present, "systemd-resolved in use") def testCanonicalNameDangling(self): name = dns.name.from_text("dangling-cname.dnspython.org") cname = dns.name.from_text("dangling-target.dnspython.org") > self.assertEqual(dns.resolver.canonical_name(name), cname) tests/test_resolver.py:799: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1640: in canonical_name return get_default_resolver().canonical_name(name) dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _______________ SelectResolverTestCase.testCanonicalNameNoCNAME ________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testCanonicalNameNoCNAME(self): cname = dns.name.from_text("www.google.com") > self.assertEqual(dns.resolver.canonical_name("www.google.com"), cname) tests/test_resolver.py:788: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1640: in canonical_name return get_default_resolver().canonical_name(name) dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ______________________ SelectResolverTestCase.testResolve ______________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolve(self): > answer = dns.resolver.resolve("dns.google.", "A") tests/test_resolver.py:653: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1565: in resolve return get_default_resolver().resolve( dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration __________________ SelectResolverTestCase.testResolveAddress ___________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveAddress(self): > answer = dns.resolver.resolve_address("8.8.8.8") tests/test_resolver.py:665: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1618: in resolve_address return get_default_resolver().resolve_address(ipaddr, *args, **kwargs) dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _________________ SelectResolverTestCase.testResolveAtAddress __________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not tests.util.have_ipv4(), "IPv4 not reachable") def testResolveAtAddress(self): > answer = dns.resolver.resolve_at("8.8.8.8", "dns.google.", "A") tests/test_resolver.py:772: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1802: in resolve_at return make_resolver_at(where, port, family, resolver).resolve( dns/resolver.py:1762: in make_resolver_at resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ___________________ SelectResolverTestCase.testResolveAtName ___________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not tests.util.have_ipv4(), "IPv4 not reachable") def testResolveAtName(self): > answer = dns.resolver.resolve_at( "dns.google", "dns.google.", "A", family=socket.AF_INET ) tests/test_resolver.py:779: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1802: in resolve_at return make_resolver_at(where, port, family, resolver).resolve( dns/resolver.py:1762: in make_resolver_at resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ________________ SelectResolverTestCase.testResolveEdnsOptions _________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = message_use_edns_mock = @patch.object(dns.message.Message, "use_edns") def testResolveEdnsOptions(self, message_use_edns_mock): > resolver = dns.resolver.Resolver() tests/test_resolver.py:698: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration __________________ SelectResolverTestCase.testResolveNXDOMAIN __________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveNXDOMAIN(self): qname = dns.name.from_text("nxdomain.dnspython.org") qclass = dns.rdataclass.from_text("IN") qtype = dns.rdatatype.from_text("A") def bad(): answer = dns.resolver.resolve(qname, qtype) try: > dns.resolver.resolve(qname, qtype) tests/test_resolver.py:731: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1565: in resolve return get_default_resolver().resolve( dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ____________________ SelectResolverTestCase.testResolveName ____________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveName(self): > answers = dns.resolver.resolve_name("dns.google.") tests/test_resolver.py:670: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1630: in resolve_name return get_default_resolver().resolve_name(name, family, **kwargs) dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ________________ SelectResolverTestCase.testResolveNodataAnswer ________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveNodataAnswer(self): qname = dns.name.from_text("dnspython.org") qclass = dns.rdataclass.from_text("IN") qtype = dns.rdatatype.from_text("SRV") > answer = dns.resolver.resolve(qname, qtype, raise_on_no_answer=False) tests/test_resolver.py:714: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1565: in resolve return get_default_resolver().resolve( dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ______________ SelectResolverTestCase.testResolveNodataException _______________ def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveNodataException(self): def bad(): dns.resolver.resolve("dnspython.org.", "SRV") > self.assertRaises(dns.resolver.NoAnswer, bad) tests/test_resolver.py:708: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_resolver.py:706: in bad dns.resolver.resolve("dnspython.org.", "SRV") dns/resolver.py:1565: in resolve return get_default_resolver().resolve( dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ____________________ SelectResolverTestCase.testResolveTCP _____________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveTCP(self): > answer = dns.resolver.resolve("dns.google.", "A", tcp=True) tests/test_resolver.py:659: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1565: in resolve return get_default_resolver().resolve( dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ___________________ SelectResolverTestCase.testTLSNameserver ___________________ self = @unittest.skipIf(not tests.util.have_ipv4(), "IPv4 not reachable") def testTLSNameserver(self): res = dns.resolver.Resolver(configure=False) res.nameservers = [dns.nameserver.DoTNameserver("8.8.8.8", 853)] > answer = res.resolve("dns.google.", "A") tests/test_resolver.py:753: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1321: in resolve timeout = self._compute_timeout(start, lifetime, resolution.errors) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = start = 1701221345.8240755, lifetime = 5.0 errors = [('DoT:8.8.8.8@853', False, 853, Timeout('The DNS operation timed out.'), None), ('DoT:8.8.8.8@853', False, 853, Timeout('The DNS operation timed out.'), None), ('DoT:8.8.8.8@853', False, 853, Timeout('The DNS operation timed out.'), None)] def _compute_timeout( self, start: float, lifetime: Optional[float] = None, errors: Optional[List[ErrorTuple]] = None, ) -> float: lifetime = self.lifetime if lifetime is None else lifetime now = time.time() duration = now - start if errors is None: errors = [] if duration < 0: if duration < -1: # Time going backwards is bad. Just give up. raise LifetimeTimeout(timeout=duration, errors=errors) else: # Time went backwards, but only a little. This can # happen, e.g. under vmware with older linux kernels. # Pretend it didn't happen. duration = 0 if duration >= lifetime: > raise LifetimeTimeout(timeout=duration, errors=errors) E dns.resolver.LifetimeTimeout: The resolution lifetime expired after 5.402 seconds: Server DoT:8.8.8.8@853 answered The DNS operation timed out.; Server DoT:8.8.8.8@853 answered The DNS operation timed out.; Server DoT:8.8.8.8@853 answered The DNS operation timed out. dns/resolver.py:1075: LifetimeTimeout ___________________ SelectResolverTestCase.testZoneForName1 ____________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName1(self): name = dns.name.from_text("www.dnspython.org.") ezname = dns.name.from_text("dnspython.org.") > zname = dns.resolver.zone_for_name(name) tests/test_resolver.py:631: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1688: in zone_for_name resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ___________________ SelectResolverTestCase.testZoneForName2 ____________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName2(self): name = dns.name.from_text("a.b.www.dnspython.org.") ezname = dns.name.from_text("dnspython.org.") > zname = dns.resolver.zone_for_name(name) tests/test_resolver.py:637: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1688: in zone_for_name resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ___________________ SelectResolverTestCase.testZoneForName3 ____________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName3(self): ezname = dns.name.from_text("dnspython.org.") > zname = dns.resolver.zone_for_name("dnspython.org.") tests/test_resolver.py:642: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1688: in zone_for_name resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ___________________ SelectResolverTestCase.testZoneForName4 ____________________ def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName4(self): def bad(): name = dns.name.from_text("dnspython.org", None) dns.resolver.zone_for_name(name) > self.assertRaises(dns.resolver.NotAbsolute, bad) tests/test_resolver.py:650: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_resolver.py:648: in bad dns.resolver.zone_for_name(name) dns/resolver.py:1688: in zone_for_name resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _________________ PollResolverTestCase.testCanonicalNameCNAME __________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testCanonicalNameCNAME(self): name = dns.name.from_text("www.dnspython.org") cname = dns.name.from_text("dmfrjf4ips8xa.cloudfront.net") > self.assertEqual(dns.resolver.canonical_name(name), cname) tests/test_resolver.py:793: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1640: in canonical_name return get_default_resolver().canonical_name(name) dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ________________ PollResolverTestCase.testCanonicalNameDangling ________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(_systemd_resolved_present, "systemd-resolved in use") def testCanonicalNameDangling(self): name = dns.name.from_text("dangling-cname.dnspython.org") cname = dns.name.from_text("dangling-target.dnspython.org") > self.assertEqual(dns.resolver.canonical_name(name), cname) tests/test_resolver.py:799: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1640: in canonical_name return get_default_resolver().canonical_name(name) dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ________________ PollResolverTestCase.testCanonicalNameNoCNAME _________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testCanonicalNameNoCNAME(self): cname = dns.name.from_text("www.google.com") > self.assertEqual(dns.resolver.canonical_name("www.google.com"), cname) tests/test_resolver.py:788: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1640: in canonical_name return get_default_resolver().canonical_name(name) dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _______________________ PollResolverTestCase.testResolve _______________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolve(self): > answer = dns.resolver.resolve("dns.google.", "A") tests/test_resolver.py:653: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1565: in resolve return get_default_resolver().resolve( dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ___________________ PollResolverTestCase.testResolveAddress ____________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveAddress(self): > answer = dns.resolver.resolve_address("8.8.8.8") tests/test_resolver.py:665: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1618: in resolve_address return get_default_resolver().resolve_address(ipaddr, *args, **kwargs) dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration __________________ PollResolverTestCase.testResolveAtAddress ___________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not tests.util.have_ipv4(), "IPv4 not reachable") def testResolveAtAddress(self): > answer = dns.resolver.resolve_at("8.8.8.8", "dns.google.", "A") tests/test_resolver.py:772: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1802: in resolve_at return make_resolver_at(where, port, family, resolver).resolve( dns/resolver.py:1762: in make_resolver_at resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ____________________ PollResolverTestCase.testResolveAtName ____________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = @unittest.skipIf(not tests.util.have_ipv4(), "IPv4 not reachable") def testResolveAtName(self): > answer = dns.resolver.resolve_at( "dns.google", "dns.google.", "A", family=socket.AF_INET ) tests/test_resolver.py:779: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1802: in resolve_at return make_resolver_at(where, port, family, resolver).resolve( dns/resolver.py:1762: in make_resolver_at resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _________________ PollResolverTestCase.testResolveEdnsOptions __________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = message_use_edns_mock = @patch.object(dns.message.Message, "use_edns") def testResolveEdnsOptions(self, message_use_edns_mock): > resolver = dns.resolver.Resolver() tests/test_resolver.py:698: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ___________________ PollResolverTestCase.testResolveNXDOMAIN ___________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveNXDOMAIN(self): qname = dns.name.from_text("nxdomain.dnspython.org") qclass = dns.rdataclass.from_text("IN") qtype = dns.rdatatype.from_text("A") def bad(): answer = dns.resolver.resolve(qname, qtype) try: > dns.resolver.resolve(qname, qtype) tests/test_resolver.py:731: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1565: in resolve return get_default_resolver().resolve( dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _____________________ PollResolverTestCase.testResolveName _____________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveName(self): > answers = dns.resolver.resolve_name("dns.google.") tests/test_resolver.py:670: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1630: in resolve_name return get_default_resolver().resolve_name(name, family, **kwargs) dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _________________ PollResolverTestCase.testResolveNodataAnswer _________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveNodataAnswer(self): qname = dns.name.from_text("dnspython.org") qclass = dns.rdataclass.from_text("IN") qtype = dns.rdatatype.from_text("SRV") > answer = dns.resolver.resolve(qname, qtype, raise_on_no_answer=False) tests/test_resolver.py:714: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1565: in resolve return get_default_resolver().resolve( dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _______________ PollResolverTestCase.testResolveNodataException ________________ def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveNodataException(self): def bad(): dns.resolver.resolve("dnspython.org.", "SRV") > self.assertRaises(dns.resolver.NoAnswer, bad) tests/test_resolver.py:708: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_resolver.py:706: in bad dns.resolver.resolve("dnspython.org.", "SRV") dns/resolver.py:1565: in resolve return get_default_resolver().resolve( dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration _____________________ PollResolverTestCase.testResolveTCP ______________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testResolveTCP(self): > answer = dns.resolver.resolve("dns.google.", "A", tcp=True) tests/test_resolver.py:659: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1565: in resolve return get_default_resolver().resolve( dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ____________________ PollResolverTestCase.testTLSNameserver ____________________ self = @unittest.skipIf(not tests.util.have_ipv4(), "IPv4 not reachable") def testTLSNameserver(self): res = dns.resolver.Resolver(configure=False) res.nameservers = [dns.nameserver.DoTNameserver("8.8.8.8", 853)] > answer = res.resolve("dns.google.", "A") tests/test_resolver.py:753: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1321: in resolve timeout = self._compute_timeout(start, lifetime, resolution.errors) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = start = 1701221361.5440307, lifetime = 5.0 errors = [('DoT:8.8.8.8@853', False, 853, Timeout('The DNS operation timed out.'), None), ('DoT:8.8.8.8@853', False, 853, Timeout('The DNS operation timed out.'), None), ('DoT:8.8.8.8@853', False, 853, Timeout('The DNS operation timed out.'), None)] def _compute_timeout( self, start: float, lifetime: Optional[float] = None, errors: Optional[List[ErrorTuple]] = None, ) -> float: lifetime = self.lifetime if lifetime is None else lifetime now = time.time() duration = now - start if errors is None: errors = [] if duration < 0: if duration < -1: # Time going backwards is bad. Just give up. raise LifetimeTimeout(timeout=duration, errors=errors) else: # Time went backwards, but only a little. This can # happen, e.g. under vmware with older linux kernels. # Pretend it didn't happen. duration = 0 if duration >= lifetime: > raise LifetimeTimeout(timeout=duration, errors=errors) E dns.resolver.LifetimeTimeout: The resolution lifetime expired after 5.401 seconds: Server DoT:8.8.8.8@853 answered The DNS operation timed out.; Server DoT:8.8.8.8@853 answered The DNS operation timed out.; Server DoT:8.8.8.8@853 answered The DNS operation timed out. dns/resolver.py:1075: LifetimeTimeout ____________________ PollResolverTestCase.testZoneForName1 _____________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName1(self): name = dns.name.from_text("www.dnspython.org.") ezname = dns.name.from_text("dnspython.org.") > zname = dns.resolver.zone_for_name(name) tests/test_resolver.py:631: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1688: in zone_for_name resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ____________________ PollResolverTestCase.testZoneForName2 _____________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName2(self): name = dns.name.from_text("a.b.www.dnspython.org.") ezname = dns.name.from_text("dnspython.org.") > zname = dns.resolver.zone_for_name(name) tests/test_resolver.py:637: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1688: in zone_for_name resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ____________________ PollResolverTestCase.testZoneForName3 _____________________ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName3(self): ezname = dns.name.from_text("dnspython.org.") > zname = dns.resolver.zone_for_name("dnspython.org.") tests/test_resolver.py:642: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:1688: in zone_for_name resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ____________________ PollResolverTestCase.testZoneForName4 _____________________ def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def testZoneForName4(self): def bad(): name = dns.name.from_text("dnspython.org", None) dns.resolver.zone_for_name(name) > self.assertRaises(dns.resolver.NotAbsolute, bad) tests/test_resolver.py:650: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_resolver.py:648: in bad dns.resolver.zone_for_name(name) dns/resolver.py:1688: in zone_for_name resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration ____________ OverrideSystemResolverTestCase.test_basic_getaddrinfo _____________ self = @unittest.skipIf( sys.platform == "win32", "avoid windows original getaddrinfo issues" ) def test_basic_getaddrinfo(self): self.assertTrue( > self.equivalent("dns.google", 53, socket.AF_INET, socket.SOCK_DGRAM) ) tests/test_resolver_override.py:97: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_resolver_override.py:89: in equivalent b = dns.resolver._original_getaddrinfo(*args, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ host = 'dns.google', port = 53, family = type = , proto = 0, flags = 0 def getaddrinfo(host, port, family=0, type=0, proto=0, flags=0): """Resolve host and port into list of address info entries. Translate the host/port argument into a sequence of 5-tuples that contain all the necessary arguments for creating a socket connected to that service. host is a domain name, a string representation of an IPv4/v6 address or None. port is a string service name such as 'http', a numeric port number or None. By passing None as the value of host and port, you can pass NULL to the underlying C API. The family, type and proto arguments can be optionally specified in order to narrow the list of addresses returned. Passing zero as a value for each of these arguments selects the full range of results. """ # We override this function since we want to translate the numeric family # and socket type values to enum constants. addrlist = [] > for res in _socket.getaddrinfo(host, port, family, type, proto, flags): E socket.gaierror: [Errno -3] Temporary failure in name resolution /usr/lib64/python3.12/socket.py:963: gaierror ______________ OverrideSystemResolverTestCase.test_gethostbyaddr _______________ self = def test_gethostbyaddr(self): > a = dns.resolver._original_gethostbyaddr("8.8.8.8") E socket.herror: [Errno 2] Host name lookup failure tests/test_resolver_override.py:193: herror _______ OverrideSystemResolverUsingDefaultResolverTestCase.test_override _______ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: > cm: contextlib.AbstractContextManager = open(f) E FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf' dns/resolver.py:992: FileNotFoundError During handling of the above exception, another exception occurred: self = def setUp(self): self.res = FakeResolver() > dns.resolver.override_system_resolver() tests/test_resolver_override.py:242: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/resolver.py:2033: in override_system_resolver resolver = get_default_resolver() dns/resolver.py:1529: in get_default_resolver reset_default_resolver() dns/resolver.py:1542: in reset_default_resolver default_resolver = Resolver() dns/resolver.py:944: in __init__ self.read_resolv_conf(filename) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , f = '/etc/resolv.conf' def read_resolv_conf(self, f: Any) -> None: """Process *f* as a file in the /etc/resolv.conf format. If f is a ``str``, it is used as the name of the file to open; otherwise it is treated as the file itself. Interprets the following items: - nameserver - name server IP address - domain - local domain name - search - search list for host-name lookup - options - supported options are rotate, timeout, edns0, and ndots """ nameservers = [] if isinstance(f, str): try: cm: contextlib.AbstractContextManager = open(f) except OSError: # /etc/resolv.conf doesn't exist, can't be read, etc. > raise NoResolverConfiguration(f"cannot open {f}") E dns.resolver.NoResolverConfiguration: cannot open /etc/resolv.conf dns/resolver.py:995: NoResolverConfiguration =========================== short test summary info ============================ FAILED tests/test_async.py::AsyncTests::testCanonicalNameCNAME - dns.resolver... FAILED tests/test_async.py::AsyncTests::testCanonicalNameDangling - dns.resol... FAILED tests/test_async.py::AsyncTests::testCanonicalNameNoCNAME - dns.resolv... FAILED tests/test_async.py::AsyncTests::testDOHGetRequest - dns.resolver.NoRe... FAILED tests/test_async.py::AsyncTests::testDOHGetRequestHttp1 - dns.resolver... FAILED tests/test_async.py::AsyncTests::testDOHPostRequest - dns.resolver.NoR... FAILED tests/test_async.py::AsyncTests::testQueryTLS - dns.exception.Timeout:... FAILED tests/test_async.py::AsyncTests::testQueryTLSWithContext - dns.excepti... FAILED tests/test_async.py::AsyncTests::testQueryTLSWithSocket - dns.exceptio... FAILED tests/test_async.py::AsyncTests::testResolve - dns.resolver.NoResolver... FAILED tests/test_async.py::AsyncTests::testResolveAddress - dns.resolver.NoR... FAILED tests/test_async.py::AsyncTests::testResolveAtAddress - dns.resolver.N... FAILED tests/test_async.py::AsyncTests::testResolveAtName - dns.resolver.NoRe... FAILED tests/test_async.py::AsyncTests::testResolveName - dns.resolver.NoReso... FAILED tests/test_async.py::AsyncTests::testResolverDOH - dns.resolver.Lifeti... FAILED tests/test_async.py::AsyncTests::testZoneForName1 - dns.resolver.NoRes... FAILED tests/test_async.py::AsyncTests::testZoneForName2 - dns.resolver.NoRes... FAILED tests/test_async.py::AsyncTests::testZoneForName3 - dns.resolver.NoRes... FAILED tests/test_async.py::AsyncTests::testZoneForName4 - dns.resolver.NoRes... FAILED tests/test_async.py::TrioAsyncTests::testCanonicalNameCNAME - dns.reso... FAILED tests/test_async.py::TrioAsyncTests::testCanonicalNameDangling - dns.r... FAILED tests/test_async.py::TrioAsyncTests::testCanonicalNameNoCNAME - dns.re... FAILED tests/test_async.py::TrioAsyncTests::testDOHGetRequest - dns.resolver.... FAILED tests/test_async.py::TrioAsyncTests::testDOHGetRequestHttp1 - dns.reso... FAILED tests/test_async.py::TrioAsyncTests::testDOHPostRequest - dns.resolver... FAILED tests/test_async.py::TrioAsyncTests::testQueryTLS - dns.exception.Time... FAILED tests/test_async.py::TrioAsyncTests::testQueryTLSWithContext - dns.exc... FAILED tests/test_async.py::TrioAsyncTests::testQueryTLSWithSocket - dns.exce... FAILED tests/test_async.py::TrioAsyncTests::testResolve - dns.resolver.NoReso... FAILED tests/test_async.py::TrioAsyncTests::testResolveAddress - dns.resolver... FAILED tests/test_async.py::TrioAsyncTests::testResolveAtAddress - dns.resolv... FAILED tests/test_async.py::TrioAsyncTests::testResolveAtName - dns.resolver.... FAILED tests/test_async.py::TrioAsyncTests::testResolveName - dns.resolver.No... FAILED tests/test_async.py::TrioAsyncTests::testResolverDOH - dns.resolver.Li... FAILED tests/test_async.py::TrioAsyncTests::testZoneForName1 - dns.resolver.N... FAILED tests/test_async.py::TrioAsyncTests::testZoneForName2 - dns.resolver.N... FAILED tests/test_async.py::TrioAsyncTests::testZoneForName3 - dns.resolver.N... FAILED tests/test_async.py::TrioAsyncTests::testZoneForName4 - dns.resolver.N... FAILED tests/test_ddr.py::test_basic_ddr_sync - AssertionError: assert False FAILED tests/test_ddr.py::test_basic_ddr_async - AssertionError: assert False FAILED tests/test_doh.py::DNSOverHTTPSTestCaseHttpx::test_build_url_from_ip FAILED tests/test_doh.py::DNSOverHTTPSTestCaseHttpx::test_get_request - dns.r... FAILED tests/test_doh.py::DNSOverHTTPSTestCaseHttpx::test_get_request_http1 FAILED tests/test_doh.py::DNSOverHTTPSTestCaseHttpx::test_new_session - dns.r... FAILED tests/test_doh.py::DNSOverHTTPSTestCaseHttpx::test_padded_get - dns.re... FAILED tests/test_doh.py::DNSOverHTTPSTestCaseHttpx::test_post_request - dns.... FAILED tests/test_doh.py::DNSOverHTTPSTestCaseHttpx::test_resolver - dns.reso... FAILED tests/test_query.py::QueryTests::testQueryTLS - dns.exception.Timeout:... FAILED tests/test_query.py::QueryTests::testQueryTLSWithContext - dns.excepti... FAILED tests/test_query.py::QueryTests::testQueryTLSWithSocket - TimeoutError... FAILED tests/test_query.py::QueryTests::testQueryTLSwithPadding - dns.excepti... FAILED tests/test_resolver.py::LiveResolverTests::testCanonicalNameCNAME - dn... FAILED tests/test_resolver.py::LiveResolverTests::testCanonicalNameDangling FAILED tests/test_resolver.py::LiveResolverTests::testCanonicalNameNoCNAME - ... FAILED tests/test_resolver.py::LiveResolverTests::testResolve - dns.resolver.... FAILED tests/test_resolver.py::LiveResolverTests::testResolveAddress - dns.re... FAILED tests/test_resolver.py::LiveResolverTests::testResolveAtAddress - dns.... FAILED tests/test_resolver.py::LiveResolverTests::testResolveAtName - dns.res... FAILED tests/test_resolver.py::LiveResolverTests::testResolveEdnsOptions - dn... FAILED tests/test_resolver.py::LiveResolverTests::testResolveNXDOMAIN - dns.r... FAILED tests/test_resolver.py::LiveResolverTests::testResolveName - dns.resol... FAILED tests/test_resolver.py::LiveResolverTests::testResolveNodataAnswer - d... FAILED tests/test_resolver.py::LiveResolverTests::testResolveNodataException FAILED tests/test_resolver.py::LiveResolverTests::testResolveTCP - dns.resolv... FAILED tests/test_resolver.py::LiveResolverTests::testTLSNameserver - dns.res... FAILED tests/test_resolver.py::LiveResolverTests::testZoneForName1 - dns.reso... FAILED tests/test_resolver.py::LiveResolverTests::testZoneForName2 - dns.reso... FAILED tests/test_resolver.py::LiveResolverTests::testZoneForName3 - dns.reso... FAILED tests/test_resolver.py::LiveResolverTests::testZoneForName4 - dns.reso... FAILED tests/test_resolver.py::SelectResolverTestCase::testCanonicalNameCNAME FAILED tests/test_resolver.py::SelectResolverTestCase::testCanonicalNameDangling FAILED tests/test_resolver.py::SelectResolverTestCase::testCanonicalNameNoCNAME FAILED tests/test_resolver.py::SelectResolverTestCase::testResolve - dns.reso... FAILED tests/test_resolver.py::SelectResolverTestCase::testResolveAddress - d... FAILED tests/test_resolver.py::SelectResolverTestCase::testResolveAtAddress FAILED tests/test_resolver.py::SelectResolverTestCase::testResolveAtName - dn... FAILED tests/test_resolver.py::SelectResolverTestCase::testResolveEdnsOptions FAILED tests/test_resolver.py::SelectResolverTestCase::testResolveNXDOMAIN - ... FAILED tests/test_resolver.py::SelectResolverTestCase::testResolveName - dns.... FAILED tests/test_resolver.py::SelectResolverTestCase::testResolveNodataAnswer FAILED tests/test_resolver.py::SelectResolverTestCase::testResolveNodataException FAILED tests/test_resolver.py::SelectResolverTestCase::testResolveTCP - dns.r... FAILED tests/test_resolver.py::SelectResolverTestCase::testTLSNameserver - dn... FAILED tests/test_resolver.py::SelectResolverTestCase::testZoneForName1 - dns... FAILED tests/test_resolver.py::SelectResolverTestCase::testZoneForName2 - dns... FAILED tests/test_resolver.py::SelectResolverTestCase::testZoneForName3 - dns... FAILED tests/test_resolver.py::SelectResolverTestCase::testZoneForName4 - dns... FAILED tests/test_resolver.py::PollResolverTestCase::testCanonicalNameCNAME FAILED tests/test_resolver.py::PollResolverTestCase::testCanonicalNameDangling FAILED tests/test_resolver.py::PollResolverTestCase::testCanonicalNameNoCNAME FAILED tests/test_resolver.py::PollResolverTestCase::testResolve - dns.resolv... FAILED tests/test_resolver.py::PollResolverTestCase::testResolveAddress - dns... FAILED tests/test_resolver.py::PollResolverTestCase::testResolveAtAddress - d... FAILED tests/test_resolver.py::PollResolverTestCase::testResolveAtName - dns.... FAILED tests/test_resolver.py::PollResolverTestCase::testResolveEdnsOptions FAILED tests/test_resolver.py::PollResolverTestCase::testResolveNXDOMAIN - dn... FAILED tests/test_resolver.py::PollResolverTestCase::testResolveName - dns.re... FAILED tests/test_resolver.py::PollResolverTestCase::testResolveNodataAnswer FAILED tests/test_resolver.py::PollResolverTestCase::testResolveNodataException FAILED tests/test_resolver.py::PollResolverTestCase::testResolveTCP - dns.res... FAILED tests/test_resolver.py::PollResolverTestCase::testTLSNameserver - dns.... FAILED tests/test_resolver.py::PollResolverTestCase::testZoneForName1 - dns.r... FAILED tests/test_resolver.py::PollResolverTestCase::testZoneForName2 - dns.r... FAILED tests/test_resolver.py::PollResolverTestCase::testZoneForName3 - dns.r... FAILED tests/test_resolver.py::PollResolverTestCase::testZoneForName4 - dns.r... FAILED tests/test_resolver_override.py::OverrideSystemResolverTestCase::test_basic_getaddrinfo FAILED tests/test_resolver_override.py::OverrideSystemResolverTestCase::test_gethostbyaddr FAILED tests/test_resolver_override.py::OverrideSystemResolverUsingDefaultResolverTestCase::test_override =========== 108 failed, 1218 passed, 6 skipped in 173.92s (0:02:53) ============ error: Bad exit status from /var/tmp/rpm-tmp.J8JBpH (%check) Bad exit status from /var/tmp/rpm-tmp.J8JBpH (%check) RPM build errors: Child return code was: 1 EXCEPTION: [Error('Command failed: \n # bash --login -c /usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-dns.spec\n', 1)] Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/mockbuild/util.py", line 597, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -ba --noprep --noclean --target noarch --nodeps /builddir/build/SPECS/python-dns.spec