Mock Version: 4.1 Mock Version: 4.1 Mock Version: 4.1 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/dist-ocs23-build-89131-5492/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=981gid=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 Wrote: /builddir/build/SRPMS/python-dns-2.4.2-1.ocs23.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/dist-ocs23-build-89131-5492/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=981gid=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 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.i4M2ar + 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 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + sed -i 's/\(cryptography = {version=">=2.6,<\)37.0\(", optional=true}\)/\139.0\2/' pyproject.toml + find examples -type f + xargs chmod a-x + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.33e7vo + umask 022 + cd /builddir/build/BUILD + cd dnspython-2.4.2 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo 'python3dist(toml)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + RPM_TOXENV=py311 + HOSTNAME=rpmbuild + /usr/bin/python3 -s /usr/lib/rpm/OpenCloudOS/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 -r Import error: No module named 'toml' + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-dns-2.4.2-1.ocs23.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/dist-ocs23-build-89131-5492/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=981gid=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 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.hXCbWL + 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 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + sed -i 's/\(cryptography = {version=">=2.6,<\)37.0\(", optional=true}\)/\139.0\2/' pyproject.toml + find examples -type f + xargs chmod a-x + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.gSjCjj + umask 022 + cd /builddir/build/BUILD + cd dnspython-2.4.2 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo 'python3dist(toml)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + RPM_TOXENV=py311 + HOSTNAME=rpmbuild + /usr/bin/python3 -s /usr/lib/rpm/OpenCloudOS/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 -r Handling poetry-core from build-system.requires Requirement not satisfied: poetry-core Exiting dependency generation pass: build backend + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-dns-2.4.2-1.ocs23.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/dist-ocs23-build-89131-5492/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=981gid=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 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.pkXgTu + 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 + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + sed -i 's/\(cryptography = {version=">=2.6,<\)37.0\(", optional=true}\)/\139.0\2/' pyproject.toml + find examples -type f + xargs chmod a-x + RPM_EC=0 ++ jobs -p + exit 0 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.cExhvL + umask 022 + cd /builddir/build/BUILD + cd dnspython-2.4.2 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo 'python3dist(toml)' + rm -rfv '*.dist-info/' + '[' -f /usr/bin/python3 ']' + RPM_TOXENV=py311 + HOSTNAME=rpmbuild + /usr/bin/python3 -s /usr/lib/rpm/OpenCloudOS/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 -r Handling poetry-core from build-system.requires Requirement satisfied: poetry-core (installed: poetry-core 1.3.2) Handling aioquic (>=0.9.20); extra == "doq" from wheel metadata: Requires-Dist Ignoring alien requirement: aioquic (>=0.9.20); extra == "doq" Handling cryptography (>=2.6,<42.0); extra == "dnssec" from wheel metadata: Requires-Dist Ignoring alien requirement: cryptography (>=2.6,<42.0); extra == "dnssec" Handling h2 (>=4.1.0); extra == "doh" from wheel metadata: Requires-Dist Ignoring alien requirement: h2 (>=4.1.0); extra == "doh" Handling httpcore (>=0.17.3); extra == "doh" from wheel metadata: Requires-Dist Ignoring alien requirement: httpcore (>=0.17.3); extra == "doh" Handling httpx (>=0.24.1); extra == "doh" from wheel metadata: Requires-Dist Ignoring alien requirement: httpx (>=0.24.1); extra == "doh" Handling idna (>=2.1,<4.0); extra == "idna" from wheel metadata: Requires-Dist Ignoring alien requirement: idna (>=2.1,<4.0); extra == "idna" Handling trio (>=0.14,<0.23); extra == "trio" from wheel metadata: Requires-Dist Ignoring alien requirement: trio (>=0.14,<0.23); extra == "trio" Handling wmi (>=1.5.1,<2.0.0); extra == "wmi" from wheel metadata: Requires-Dist Ignoring alien requirement: wmi (>=1.5.1,<2.0.0); extra == "wmi" + RPM_EC=0 ++ jobs -p + exit 0 Wrote: /builddir/build/SRPMS/python-dns-2.4.2-1.ocs23.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/dist-ocs23-build-89131-5492/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=86400uid=981gid=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 Executing(%generate_buildrequires): /bin/sh -e /var/tmp/rpm-tmp.EK6ssS + umask 022 + cd /builddir/build/BUILD + cd dnspython-2.4.2 + echo pyproject-rpm-macros + echo python3-devel + echo 'python3dist(pip) >= 19' + echo 'python3dist(packaging)' + '[' -f pyproject.toml ']' + echo 'python3dist(toml)' + rm -rfv dnspython-2.4.2.dist-info/ removed 'dnspython-2.4.2.dist-info/METADATA' removed 'dnspython-2.4.2.dist-info/WHEEL' removed directory 'dnspython-2.4.2.dist-info/' + '[' -f /usr/bin/python3 ']' + RPM_TOXENV=py311 + HOSTNAME=rpmbuild + /usr/bin/python3 -s /usr/lib/rpm/OpenCloudOS/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 -r Handling poetry-core from build-system.requires Requirement satisfied: poetry-core (installed: poetry-core 1.3.2) Handling aioquic (>=0.9.20); extra == "doq" from wheel metadata: Requires-Dist Ignoring alien requirement: aioquic (>=0.9.20); extra == "doq" Handling cryptography (>=2.6,<42.0); extra == "dnssec" from wheel metadata: Requires-Dist Ignoring alien requirement: cryptography (>=2.6,<42.0); extra == "dnssec" Handling h2 (>=4.1.0); extra == "doh" from wheel metadata: Requires-Dist Ignoring alien requirement: h2 (>=4.1.0); extra == "doh" Handling httpcore (>=0.17.3); extra == "doh" from wheel metadata: Requires-Dist Ignoring alien requirement: httpcore (>=0.17.3); extra == "doh" Handling httpx (>=0.24.1); extra == "doh" from wheel metadata: Requires-Dist Ignoring alien requirement: httpx (>=0.24.1); extra == "doh" Handling idna (>=2.1,<4.0); extra == "idna" from wheel metadata: Requires-Dist Ignoring alien requirement: idna (>=2.1,<4.0); extra == "idna" Handling trio (>=0.14,<0.23); extra == "trio" from wheel metadata: Requires-Dist Ignoring alien requirement: trio (>=0.14,<0.23); extra == "trio" Handling wmi (>=1.5.1,<2.0.0); extra == "wmi" from wheel metadata: Requires-Dist Ignoring alien requirement: wmi (>=1.5.1,<2.0.0); extra == "wmi" + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.UxWNjf + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -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,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -Wl,--build-id=sha1' + TMPDIR=/builddir/build/BUILD/dnspython-2.4.2/.pyproject-builddir + /usr/bin/python3 -m pip wheel --wheel-dir /builddir/build/BUILD/dnspython-2.4.2/pyproject-wheeldir --no-deps --use-pep517 --no-build-isolation --disable-pip-version-check --no-clean --progress-bar off --verbose . 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=300363 sha256=d0d62f92b06ccd791f5474dd486f523ea05d066954b1b97e5037ebe4868bcace Stored in directory: /builddir/.cache/pip/wheels/29/f5/8b/690813581bf6697141a4096d567cc77274442dbf9b7521930a Successfully built dnspython + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.BTfOJE + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch '!=' / ']' + rm -rf /builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch ++ dirname /builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch + 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.ocs23.noarch --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 22.3.1 from /usr/lib/python3.11/site-packages/pip (python 3.11) 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.ocs23.noarch/usr/bin ']' + rm -f /builddir/build/BUILD/pyproject-ghost-distinfo + site_dirs=() + '[' -d /builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch/usr/lib/python3.11/site-packages ']' + site_dirs+=("/usr/lib/python3.11/site-packages") + '[' /builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch/usr/lib64/python3.11/site-packages '!=' /builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch/usr/lib/python3.11/site-packages ']' + '[' -d /builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch/usr/lib64/python3.11/site-packages ']' + for site_dir in ${site_dirs[@]} + for distinfo in /builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch$site_dir/*.dist-info + echo '%ghost /usr/lib/python3.11/site-packages/dnspython-2.4.2.dist-info' + sed -i s/pip/rpm/ /builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch/usr/lib/python3.11/site-packages/dnspython-2.4.2.dist-info/INSTALLER + PYTHONPATH=/usr/lib/rpm/OpenCloudOS + /usr/bin/python3 -B /usr/lib/rpm/OpenCloudOS/pyproject_preprocess_record.py --buildroot /builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch --record /builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch/usr/lib/python3.11/site-packages/dnspython-2.4.2.dist-info/RECORD --output /builddir/build/BUILD/pyproject-record + rm -fv /builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch/usr/lib/python3.11/site-packages/dnspython-2.4.2.dist-info/RECORD removed '/builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch/usr/lib/python3.11/site-packages/dnspython-2.4.2.dist-info/RECORD' + rm -fv /builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch/usr/lib/python3.11/site-packages/dnspython-2.4.2.dist-info/REQUESTED removed '/builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch/usr/lib/python3.11/site-packages/dnspython-2.4.2.dist-info/REQUESTED' ++ wc -l /builddir/build/BUILD/pyproject-ghost-distinfo ++ cut -f1 '-d ' + lines=1 + '[' 1 -ne 1 ']' + /usr/bin/python3 /usr/lib/rpm/OpenCloudOS/pyproject_save_files.py --output-files /builddir/build/BUILD/pyproject-files --output-modules /builddir/build/BUILD/pyproject-modules --buildroot /builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch --sitelib /usr/lib/python3.11/site-packages --sitearch /usr/lib64/python3.11/site-packages --python-version 3.11 --pyproject-record /builddir/build/BUILD/pyproject-record --prefix /usr dns + /usr/bin/find-debuginfo -j8 --strict-build-id -m -i --build-id-seed 2.4.2-1.ocs23 --unique-debug-suffix -2.4.2-1.ocs23.noarch --unique-debug-src-base python-dns-2.4.2-1.ocs23.noarch -S debugsourcefiles.list /builddir/build/BUILD/dnspython-2.4.2 find: 'debug': No such file or directory + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/OpenCloudOS/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/OpenCloudOS/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/OpenCloudOS/brp-mangle-shebangs + /usr/lib/rpm/OpenCloudOS/brp-python-bytecompile '' 1 0 Bytecompiling .py files below /builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch/usr/lib/python3.11 using python3.11 + /usr/lib/rpm/OpenCloudOS/brp-python-hardlink Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.mIiFBH + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/lib/gfortran/modules' + export FCFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -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 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-cc1 -fstack-protector-strong -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/OpenCloudOS/OpenCloudOS-hardened-ld -Wl,--build-id=sha1' + PATH=/builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch/usr/lib64/python3.11/site-packages:/builddir/build/BUILDROOT/python-dns-2.4.2-1.ocs23.noarch/usr/lib/python3.11/site-packages + PYTHONDONTWRITEBYTECODE=1 + PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/dnspython-2.4.2/.pyproject-builddir' + /usr/bin/pytest ============================= test session starts ============================== platform linux -- Python 3.11.4, pytest-7.4.0, pluggy-1.0.0 rootdir: /builddir/build/BUILD/dnspython-2.4.2 configfile: pytest.ini collected 1298 items tests/test_address.py .... [ 0%] tests/test_async.py .......FFFsss..FFF....FFFFFs...FFFF. [ 3%] tests/test_bugs.py ....... [ 3%] tests/test_constants.py ..... [ 4%] tests/test_ddr.py FF [ 4%] tests/test_dnssec.py ............FF...F..F....FF..F..................... [ 8%] ............F. [ 9%] tests/test_dnssecalgs.py ....F.... [ 9%] tests/test_doh.py sssssss [ 10%] tests/test_doq.py ss [ 10%] tests/test_edns.py .............. [ 11%] tests/test_entropy.py ..... [ 12%] tests/test_exceptions.py ..... [ 12%] tests/test_flags.py ............ [ 13%] tests/test_generate.py ................. [ 14%] tests/test_grange.py .......... [ 15%] tests/test_immutable.py ...... [ 15%] tests/test_message.py ...............s.................................. [ 19%] ................ [ 20%] tests/test_name.py ............s.............s.......................... [ 25%] ..........................ss.........s.......................s.......... [ 30%] .........................sss................... [ 34%] tests/test_namedict.py ...................... [ 35%] tests/test_nsec3.py .. [ 36%] tests/test_nsec3_hash.py ... [ 36%] tests/test_ntoaaton.py ............................................. [ 39%] tests/test_processing_order.py .......... [ 40%] tests/test_query.py ..FFFF...F.............ssssssssssss.. [ 43%] tests/test_rdata.py .................................................... [ 47%] ...........s.......................... [ 50%] tests/test_rdataset.py ..s............... [ 51%] tests/test_rdtypeandclass.py .......................... [ 53%] tests/test_rdtypeanydnskey.py .. [ 53%] tests/test_rdtypeanyeui.py ........................ [ 55%] tests/test_rdtypeanyloc.py .... [ 56%] tests/test_rdtypeanytkey.py .... [ 56%] tests/test_renderer.py ..... [ 56%] tests/test_resolution.py ............................... [ 59%] tests/test_resolver.py ..........................FFF.sFFFF.FFFFFFFFFFFFF [ 62%] F.sFFFF.FFFFFFFFFFFFFF.sFFFF.FFFFFFFFFFF........sssssss [ 67%] tests/test_resolver_override.py F...F........F [ 68%] tests/test_rrset.py .s.................... [ 69%] tests/test_rrset_reader.py ............ [ 70%] tests/test_serial.py ........... [ 71%] tests/test_set.py ................................................... [ 75%] tests/test_svcb.py ................ [ 76%] 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 ....... [ 86%] tests/test_update.py ....................... [ 88%] tests/test_wire.py ....... [ 89%] tests/test_xfr.py ...........................ssss [ 91%] tests/test_zone.py ........s............................................ [ 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.11/asyncio/runners.py:190: in run return runner.run(main) /usr/lib64/python3.11/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.11/asyncio/base_events.py:653: 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.11/asyncio/runners.py:190: in run return runner.run(main) /usr/lib64/python3.11/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.11/asyncio/base_events.py:653: 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.11/asyncio/runners.py:190: in run return runner.run(main) /usr/lib64/python3.11/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.11/asyncio/base_events.py:653: 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.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. This function is a coroutine. """ loop = events.get_running_loop() if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: return fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: > return fut.result() /usr/lib64/python3.11/asyncio/tasks.py:490: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.11/asyncio/streams.py:48: in open_connection transport, _ = await loop.create_connection( /usr/lib64/python3.11/asyncio/base_events.py:1069: in create_connection sock = await self._connect_sock( /usr/lib64/python3.11/asyncio/base_events.py:973: in _connect_sock await self.sock_connect(sock, address) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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.11/asyncio/selector_events.py:634: 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. This function is a coroutine. """ loop = events.get_running_loop() if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: return fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: return fut.result() except exceptions.CancelledError as exc: > raise exceptions.TimeoutError() from exc E TimeoutError /usr/lib64/python3.11/asyncio/tasks.py:492: 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.11/asyncio/runners.py:190: in run return runner.run(main) /usr/lib64/python3.11/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.11/asyncio/base_events.py:653: 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. This function is a coroutine. """ loop = events.get_running_loop() if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: return fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: > return fut.result() /usr/lib64/python3.11/asyncio/tasks.py:490: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.11/asyncio/streams.py:48: in open_connection transport, _ = await loop.create_connection( /usr/lib64/python3.11/asyncio/base_events.py:1069: in create_connection sock = await self._connect_sock( /usr/lib64/python3.11/asyncio/base_events.py:973: in _connect_sock await self.sock_connect(sock, address) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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.11/asyncio/selector_events.py:634: 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. This function is a coroutine. """ loop = events.get_running_loop() if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: return fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: return fut.result() except exceptions.CancelledError as exc: > raise exceptions.TimeoutError() from exc E TimeoutError /usr/lib64/python3.11/asyncio/tasks.py:492: 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.11/asyncio/runners.py:190: in run return runner.run(main) /usr/lib64/python3.11/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.11/asyncio/base_events.py:653: 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. This function is a coroutine. """ loop = events.get_running_loop() if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: return fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: > return fut.result() /usr/lib64/python3.11/asyncio/tasks.py:490: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.11/asyncio/streams.py:48: in open_connection transport, _ = await loop.create_connection( /usr/lib64/python3.11/asyncio/base_events.py:1069: in create_connection sock = await self._connect_sock( /usr/lib64/python3.11/asyncio/base_events.py:973: in _connect_sock await self.sock_connect(sock, address) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 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.11/asyncio/selector_events.py:634: 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. This function is a coroutine. """ loop = events.get_running_loop() if timeout is None: return await fut if timeout <= 0: fut = ensure_future(fut, loop=loop) if fut.done(): return fut.result() await _cancel_and_wait(fut, loop=loop) try: return fut.result() except exceptions.CancelledError as exc: raise exceptions.TimeoutError() from exc waiter = loop.create_future() timeout_handle = loop.call_later(timeout, _release_waiter, waiter) cb = functools.partial(_release_waiter, waiter) fut = ensure_future(fut, loop=loop) fut.add_done_callback(cb) try: # wait until the future completes or the timeout try: await waiter except exceptions.CancelledError: if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) raise if fut.done(): return fut.result() else: fut.remove_done_callback(cb) # We must ensure that the task is not running # after wait_for() returns. # See https://bugs.python.org/issue32751 await _cancel_and_wait(fut, loop=loop) # In case task cancellation failed with some # exception, we should re-raise it # See https://bugs.python.org/issue40607 try: return fut.result() except exceptions.CancelledError as exc: > raise exceptions.TimeoutError() from exc E TimeoutError /usr/lib64/python3.11/asyncio/tasks.py:492: 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.11/asyncio/runners.py:190: in run return runner.run(main) /usr/lib64/python3.11/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.11/asyncio/base_events.py:653: 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.11/asyncio/runners.py:190: in run return runner.run(main) /usr/lib64/python3.11/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.11/asyncio/base_events.py:653: 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.11/asyncio/runners.py:190: in run return runner.run(main) /usr/lib64/python3.11/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.11/asyncio/base_events.py:653: 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.11/asyncio/runners.py:190: in run return runner.run(main) /usr/lib64/python3.11/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.11/asyncio/base_events.py:653: 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.11/asyncio/runners.py:190: in run return runner.run(main) /usr/lib64/python3.11/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.11/asyncio/base_events.py:653: 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.11/asyncio/runners.py:190: in run return runner.run(main) /usr/lib64/python3.11/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.11/asyncio/base_events.py:653: 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.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.11/asyncio/runners.py:190: in run return runner.run(main) /usr/lib64/python3.11/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.11/asyncio/base_events.py:653: 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.11/asyncio/runners.py:190: in run return runner.run(main) /usr/lib64/python3.11/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.11/asyncio/base_events.py:653: 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.11/asyncio/runners.py:190: in run return runner.run(main) /usr/lib64/python3.11/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.11/asyncio/base_events.py:653: 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.11/asyncio/runners.py:190: in run return runner.run(main) /usr/lib64/python3.11/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.11/asyncio/base_events.py:653: 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 _____________________________ 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.11/asyncio/runners.py:190: in run return runner.run(main) /usr/lib64/python3.11/asyncio/runners.py:118: in run return self._loop.run_until_complete(task) /usr/lib64/python3.11/asyncio/base_events.py:653: 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 __________________ DNSSECValidatorTestCase.testAbsoluteRSABad __________________ self = def testAbsoluteRSABad(self): # type: () -> None def bad(): # type: () -> None dns.dnssec.validate(abs_other_soa, abs_soa_rrsig, abs_keys, None, when) > self.assertRaises(dns.dnssec.ValidationFailure, bad) tests/test_dnssec.py:674: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_dnssec.py:672: in bad dns.dnssec.validate(abs_other_soa, abs_soa_rrsig, abs_keys, None, when) dns/dnssec.py:468: in _validate _validate_rrsig(rrset, rrsig, keys, origin, now, policy) dns/dnssec.py:393: in _validate_rrsig _validate_signature(rrsig.signature, data, candidate_key) dns/dnssec.py:330: in _validate_signature public_key.verify(sig, data) dns/dnssecalgs/rsa.py:20: in verify self.key.verify(signature, data, padding.PKCS1v15(), self.chosen_hash) /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:582: in verify _rsa_sig_verify( /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:308: in _rsa_sig_verify pkey_ctx = _rsa_sig_setup( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def _rsa_sig_setup( backend: Backend, padding: AsymmetricPadding, algorithm: typing.Optional[hashes.HashAlgorithm], key: typing.Union[_RSAPublicKey, _RSAPrivateKey], init_func: typing.Callable[[typing.Any], int], ): padding_enum = _rsa_sig_determine_padding(backend, key, padding, algorithm) pkey_ctx = backend._lib.EVP_PKEY_CTX_new(key._evp_pkey, backend._ffi.NULL) backend.openssl_assert(pkey_ctx != backend._ffi.NULL) pkey_ctx = backend._ffi.gc(pkey_ctx, backend._lib.EVP_PKEY_CTX_free) res = init_func(pkey_ctx) if res != 1: errors = backend._consume_errors() raise ValueError("Unable to sign/verify with this key", errors) if algorithm is not None: evp_md = backend._evp_md_non_null_from_algorithm(algorithm) res = backend._lib.EVP_PKEY_CTX_set_signature_md(pkey_ctx, evp_md) if res <= 0: backend._consume_errors() > raise UnsupportedAlgorithm( "{} is not supported by this backend for RSA signing.".format( algorithm.name ), _Reasons.UNSUPPORTED_HASH, ) E cryptography.exceptions.UnsupportedAlgorithm: sha1 is not supported by this backend for RSA signing. /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:236: UnsupportedAlgorithm _________________ DNSSECValidatorTestCase.testAbsoluteRSAGood __________________ self = def testAbsoluteRSAGood(self): # type: () -> None > dns.dnssec.validate(abs_soa, abs_soa_rrsig, abs_keys, None, when) tests/test_dnssec.py:663: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/dnssec.py:468: in _validate _validate_rrsig(rrset, rrsig, keys, origin, now, policy) dns/dnssec.py:393: in _validate_rrsig _validate_signature(rrsig.signature, data, candidate_key) dns/dnssec.py:330: in _validate_signature public_key.verify(sig, data) dns/dnssecalgs/rsa.py:20: in verify self.key.verify(signature, data, padding.PKCS1v15(), self.chosen_hash) /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:582: in verify _rsa_sig_verify( /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:308: in _rsa_sig_verify pkey_ctx = _rsa_sig_setup( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ backend = padding = algorithm = key = init_func = def _rsa_sig_setup( backend: Backend, padding: AsymmetricPadding, algorithm: typing.Optional[hashes.HashAlgorithm], key: typing.Union[_RSAPublicKey, _RSAPrivateKey], init_func: typing.Callable[[typing.Any], int], ): padding_enum = _rsa_sig_determine_padding(backend, key, padding, algorithm) pkey_ctx = backend._lib.EVP_PKEY_CTX_new(key._evp_pkey, backend._ffi.NULL) backend.openssl_assert(pkey_ctx != backend._ffi.NULL) pkey_ctx = backend._ffi.gc(pkey_ctx, backend._lib.EVP_PKEY_CTX_free) res = init_func(pkey_ctx) if res != 1: errors = backend._consume_errors() raise ValueError("Unable to sign/verify with this key", errors) if algorithm is not None: evp_md = backend._evp_md_non_null_from_algorithm(algorithm) res = backend._lib.EVP_PKEY_CTX_set_signature_md(pkey_ctx, evp_md) if res <= 0: backend._consume_errors() > raise UnsupportedAlgorithm( "{} is not supported by this backend for RSA signing.".format( algorithm.name ), _Reasons.UNSUPPORTED_HASH, ) E cryptography.exceptions.UnsupportedAlgorithm: sha1 is not supported by this backend for RSA signing. /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:236: UnsupportedAlgorithm ____________ DNSSECValidatorTestCase.testAlternateParameterFormats _____________ self = def testAlternateParameterFormats(self): # type: () -> None # Pass rrset and rrsigset as (name, rdataset) tuples, not rrsets rrset = (abs_soa.name, abs_soa.to_rdataset()) rrsigset = (abs_soa_rrsig.name, abs_soa_rrsig.to_rdataset()) > dns.dnssec.validate(rrset, rrsigset, abs_keys, None, when) tests/test_dnssec.py:851: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/dnssec.py:468: in _validate _validate_rrsig(rrset, rrsig, keys, origin, now, policy) dns/dnssec.py:393: in _validate_rrsig _validate_signature(rrsig.signature, data, candidate_key) dns/dnssec.py:330: in _validate_signature public_key.verify(sig, data) dns/dnssecalgs/rsa.py:20: in verify self.key.verify(signature, data, padding.PKCS1v15(), self.chosen_hash) /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:582: in verify _rsa_sig_verify( /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:308: in _rsa_sig_verify pkey_ctx = _rsa_sig_setup( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ backend = padding = algorithm = key = init_func = def _rsa_sig_setup( backend: Backend, padding: AsymmetricPadding, algorithm: typing.Optional[hashes.HashAlgorithm], key: typing.Union[_RSAPublicKey, _RSAPrivateKey], init_func: typing.Callable[[typing.Any], int], ): padding_enum = _rsa_sig_determine_padding(backend, key, padding, algorithm) pkey_ctx = backend._lib.EVP_PKEY_CTX_new(key._evp_pkey, backend._ffi.NULL) backend.openssl_assert(pkey_ctx != backend._ffi.NULL) pkey_ctx = backend._ffi.gc(pkey_ctx, backend._lib.EVP_PKEY_CTX_free) res = init_func(pkey_ctx) if res != 1: errors = backend._consume_errors() raise ValueError("Unable to sign/verify with this key", errors) if algorithm is not None: evp_md = backend._evp_md_non_null_from_algorithm(algorithm) res = backend._lib.EVP_PKEY_CTX_set_signature_md(pkey_ctx, evp_md) if res <= 0: backend._consume_errors() > raise UnsupportedAlgorithm( "{} is not supported by this backend for RSA signing.".format( algorithm.name ), _Reasons.UNSUPPORTED_HASH, ) E cryptography.exceptions.UnsupportedAlgorithm: sha1 is not supported by this backend for RSA signing. /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:236: UnsupportedAlgorithm _________________ DNSSECValidatorTestCase.testDuplicateKeytag __________________ self = def testDuplicateKeytag(self): # type: () -> None > dns.dnssec.validate( abs_soa, abs_soa_rrsig, abs_keys_duplicate_keytag, None, when ) tests/test_dnssec.py:666: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/dnssec.py:468: in _validate _validate_rrsig(rrset, rrsig, keys, origin, now, policy) dns/dnssec.py:393: in _validate_rrsig _validate_signature(rrsig.signature, data, candidate_key) dns/dnssec.py:330: in _validate_signature public_key.verify(sig, data) dns/dnssecalgs/rsa.py:20: in verify self.key.verify(signature, data, padding.PKCS1v15(), self.chosen_hash) /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:582: in verify _rsa_sig_verify( /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:308: in _rsa_sig_verify pkey_ctx = _rsa_sig_setup( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ backend = padding = algorithm = key = init_func = def _rsa_sig_setup( backend: Backend, padding: AsymmetricPadding, algorithm: typing.Optional[hashes.HashAlgorithm], key: typing.Union[_RSAPublicKey, _RSAPrivateKey], init_func: typing.Callable[[typing.Any], int], ): padding_enum = _rsa_sig_determine_padding(backend, key, padding, algorithm) pkey_ctx = backend._lib.EVP_PKEY_CTX_new(key._evp_pkey, backend._ffi.NULL) backend.openssl_assert(pkey_ctx != backend._ffi.NULL) pkey_ctx = backend._ffi.gc(pkey_ctx, backend._lib.EVP_PKEY_CTX_free) res = init_func(pkey_ctx) if res != 1: errors = backend._consume_errors() raise ValueError("Unable to sign/verify with this key", errors) if algorithm is not None: evp_md = backend._evp_md_non_null_from_algorithm(algorithm) res = backend._lib.EVP_PKEY_CTX_set_signature_md(pkey_ctx, evp_md) if res <= 0: backend._consume_errors() > raise UnsupportedAlgorithm( "{} is not supported by this backend for RSA signing.".format( algorithm.name ), _Reasons.UNSUPPORTED_HASH, ) E cryptography.exceptions.UnsupportedAlgorithm: sha1 is not supported by this backend for RSA signing. /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:236: UnsupportedAlgorithm __________________ DNSSECValidatorTestCase.testRelativeRSABad __________________ self = def testRelativeRSABad(self): # type: () -> None def bad(): # type: () -> None dns.dnssec.validate( rel_other_soa, rel_soa_rrsig, rel_keys, abs_dnspython_org, when ) > self.assertRaises(dns.dnssec.ValidationFailure, bad) tests/test_dnssec.py:687: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_dnssec.py:683: in bad dns.dnssec.validate( dns/dnssec.py:468: in _validate _validate_rrsig(rrset, rrsig, keys, origin, now, policy) dns/dnssec.py:393: in _validate_rrsig _validate_signature(rrsig.signature, data, candidate_key) dns/dnssec.py:330: in _validate_signature public_key.verify(sig, data) dns/dnssecalgs/rsa.py:20: in verify self.key.verify(signature, data, padding.PKCS1v15(), self.chosen_hash) /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:582: in verify _rsa_sig_verify( /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:308: in _rsa_sig_verify pkey_ctx = _rsa_sig_setup( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def _rsa_sig_setup( backend: Backend, padding: AsymmetricPadding, algorithm: typing.Optional[hashes.HashAlgorithm], key: typing.Union[_RSAPublicKey, _RSAPrivateKey], init_func: typing.Callable[[typing.Any], int], ): padding_enum = _rsa_sig_determine_padding(backend, key, padding, algorithm) pkey_ctx = backend._lib.EVP_PKEY_CTX_new(key._evp_pkey, backend._ffi.NULL) backend.openssl_assert(pkey_ctx != backend._ffi.NULL) pkey_ctx = backend._ffi.gc(pkey_ctx, backend._lib.EVP_PKEY_CTX_free) res = init_func(pkey_ctx) if res != 1: errors = backend._consume_errors() raise ValueError("Unable to sign/verify with this key", errors) if algorithm is not None: evp_md = backend._evp_md_non_null_from_algorithm(algorithm) res = backend._lib.EVP_PKEY_CTX_set_signature_md(pkey_ctx, evp_md) if res <= 0: backend._consume_errors() > raise UnsupportedAlgorithm( "{} is not supported by this backend for RSA signing.".format( algorithm.name ), _Reasons.UNSUPPORTED_HASH, ) E cryptography.exceptions.UnsupportedAlgorithm: sha1 is not supported by this backend for RSA signing. /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:236: UnsupportedAlgorithm _________________ DNSSECValidatorTestCase.testRelativeRSAGood __________________ self = def testRelativeRSAGood(self): # type: () -> None > dns.dnssec.validate(rel_soa, rel_soa_rrsig, rel_keys, abs_dnspython_org, when) tests/test_dnssec.py:677: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/dnssec.py:468: in _validate _validate_rrsig(rrset, rrsig, keys, origin, now, policy) dns/dnssec.py:393: in _validate_rrsig _validate_signature(rrsig.signature, data, candidate_key) dns/dnssec.py:330: in _validate_signature public_key.verify(sig, data) dns/dnssecalgs/rsa.py:20: in verify self.key.verify(signature, data, padding.PKCS1v15(), self.chosen_hash) /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:582: in verify _rsa_sig_verify( /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:308: in _rsa_sig_verify pkey_ctx = _rsa_sig_setup( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ backend = padding = algorithm = key = init_func = def _rsa_sig_setup( backend: Backend, padding: AsymmetricPadding, algorithm: typing.Optional[hashes.HashAlgorithm], key: typing.Union[_RSAPublicKey, _RSAPrivateKey], init_func: typing.Callable[[typing.Any], int], ): padding_enum = _rsa_sig_determine_padding(backend, key, padding, algorithm) pkey_ctx = backend._lib.EVP_PKEY_CTX_new(key._evp_pkey, backend._ffi.NULL) backend.openssl_assert(pkey_ctx != backend._ffi.NULL) pkey_ctx = backend._ffi.gc(pkey_ctx, backend._lib.EVP_PKEY_CTX_free) res = init_func(pkey_ctx) if res != 1: errors = backend._consume_errors() raise ValueError("Unable to sign/verify with this key", errors) if algorithm is not None: evp_md = backend._evp_md_non_null_from_algorithm(algorithm) res = backend._lib.EVP_PKEY_CTX_set_signature_md(pkey_ctx, evp_md) if res <= 0: backend._consume_errors() > raise UnsupportedAlgorithm( "{} is not supported by this backend for RSA signing.".format( algorithm.name ), _Reasons.UNSUPPORTED_HASH, ) E cryptography.exceptions.UnsupportedAlgorithm: sha1 is not supported by this backend for RSA signing. /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:236: UnsupportedAlgorithm ________________ DNSSECValidatorTestCase.testWildcardGoodAndBad ________________ self = def testWildcardGoodAndBad(self): > dns.dnssec.validate( wildcard_txt, wildcard_txt_rrsig, wildcard_keys, None, wildcard_when ) tests/test_dnssec.py:802: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/dnssec.py:468: in _validate _validate_rrsig(rrset, rrsig, keys, origin, now, policy) dns/dnssec.py:393: in _validate_rrsig _validate_signature(rrsig.signature, data, candidate_key) dns/dnssec.py:330: in _validate_signature public_key.verify(sig, data) dns/dnssecalgs/rsa.py:20: in verify self.key.verify(signature, data, padding.PKCS1v15(), self.chosen_hash) /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:582: in verify _rsa_sig_verify( /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:308: in _rsa_sig_verify pkey_ctx = _rsa_sig_setup( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ backend = padding = algorithm = key = init_func = def _rsa_sig_setup( backend: Backend, padding: AsymmetricPadding, algorithm: typing.Optional[hashes.HashAlgorithm], key: typing.Union[_RSAPublicKey, _RSAPrivateKey], init_func: typing.Callable[[typing.Any], int], ): padding_enum = _rsa_sig_determine_padding(backend, key, padding, algorithm) pkey_ctx = backend._lib.EVP_PKEY_CTX_new(key._evp_pkey, backend._ffi.NULL) backend.openssl_assert(pkey_ctx != backend._ffi.NULL) pkey_ctx = backend._ffi.gc(pkey_ctx, backend._lib.EVP_PKEY_CTX_free) res = init_func(pkey_ctx) if res != 1: errors = backend._consume_errors() raise ValueError("Unable to sign/verify with this key", errors) if algorithm is not None: evp_md = backend._evp_md_non_null_from_algorithm(algorithm) res = backend._lib.EVP_PKEY_CTX_set_signature_md(pkey_ctx, evp_md) if res <= 0: backend._consume_errors() > raise UnsupportedAlgorithm( "{} is not supported by this backend for RSA signing.".format( algorithm.name ), _Reasons.UNSUPPORTED_HASH, ) E cryptography.exceptions.UnsupportedAlgorithm: sha1 is not supported by this backend for RSA signing. /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:236: UnsupportedAlgorithm _________________ DNSSECSignatureTestCase.testSignatureRSASHA1 _________________ self = def testSignatureRSASHA1(self): # type: () -> None key = rsa.generate_private_key( public_exponent=65537, key_size=2048, backend=default_backend() ) > self._test_signature(key, dns.dnssec.Algorithm.RSASHA1, abs_soa) tests/test_dnssec.py:1392: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_dnssec.py:1443: in _test_signature rrsig = dns.dnssec.sign( dns/dnssec.py:591: in _sign signature = signing_key.sign(data, verify) dns/dnssecalgs/rsa.py:61: in sign signature = self.key.sign(data, padding.PKCS1v15(), self.public_cls.chosen_hash) /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:513: in sign return _rsa_sig_sign(self._backend, padding, algorithm, self, data) /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:275: in _rsa_sig_sign pkey_ctx = _rsa_sig_setup( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ backend = padding = algorithm = key = init_func = def _rsa_sig_setup( backend: Backend, padding: AsymmetricPadding, algorithm: typing.Optional[hashes.HashAlgorithm], key: typing.Union[_RSAPublicKey, _RSAPrivateKey], init_func: typing.Callable[[typing.Any], int], ): padding_enum = _rsa_sig_determine_padding(backend, key, padding, algorithm) pkey_ctx = backend._lib.EVP_PKEY_CTX_new(key._evp_pkey, backend._ffi.NULL) backend.openssl_assert(pkey_ctx != backend._ffi.NULL) pkey_ctx = backend._ffi.gc(pkey_ctx, backend._lib.EVP_PKEY_CTX_free) res = init_func(pkey_ctx) if res != 1: errors = backend._consume_errors() raise ValueError("Unable to sign/verify with this key", errors) if algorithm is not None: evp_md = backend._evp_md_non_null_from_algorithm(algorithm) res = backend._lib.EVP_PKEY_CTX_set_signature_md(pkey_ctx, evp_md) if res <= 0: backend._consume_errors() > raise UnsupportedAlgorithm( "{} is not supported by this backend for RSA signing.".format( algorithm.name ), _Reasons.UNSUPPORTED_HASH, ) E cryptography.exceptions.UnsupportedAlgorithm: sha1 is not supported by this backend for RSA signing. /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:236: UnsupportedAlgorithm ___________________________ DNSSECAlgorithm.test_rsa ___________________________ self = def test_rsa(self): self._test_dnssec_alg(PrivateRSAMD5, 2048) > self._test_dnssec_alg(PrivateRSASHA1, 2048) tests/test_dnssecalgs.py:83: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_dnssecalgs.py:57: in _test_dnssec_alg signature = private_key.sign(data, verify=True) dns/dnssecalgs/rsa.py:61: in sign signature = self.key.sign(data, padding.PKCS1v15(), self.public_cls.chosen_hash) /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:513: in sign return _rsa_sig_sign(self._backend, padding, algorithm, self, data) /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:275: in _rsa_sig_sign pkey_ctx = _rsa_sig_setup( _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ backend = padding = algorithm = key = init_func = def _rsa_sig_setup( backend: Backend, padding: AsymmetricPadding, algorithm: typing.Optional[hashes.HashAlgorithm], key: typing.Union[_RSAPublicKey, _RSAPrivateKey], init_func: typing.Callable[[typing.Any], int], ): padding_enum = _rsa_sig_determine_padding(backend, key, padding, algorithm) pkey_ctx = backend._lib.EVP_PKEY_CTX_new(key._evp_pkey, backend._ffi.NULL) backend.openssl_assert(pkey_ctx != backend._ffi.NULL) pkey_ctx = backend._ffi.gc(pkey_ctx, backend._lib.EVP_PKEY_CTX_free) res = init_func(pkey_ctx) if res != 1: errors = backend._consume_errors() raise ValueError("Unable to sign/verify with this key", errors) if algorithm is not None: evp_md = backend._evp_md_non_null_from_algorithm(algorithm) res = backend._lib.EVP_PKEY_CTX_set_signature_md(pkey_ctx, evp_md) if res <= 0: backend._consume_errors() > raise UnsupportedAlgorithm( "{} is not supported by this backend for RSA signing.".format( algorithm.name ), _Reasons.UNSUPPORTED_HASH, ) E cryptography.exceptions.UnsupportedAlgorithm: sha1 is not supported by this backend for RSA signing. /usr/lib64/python3.11/site-packages/cryptography/hazmat/backends/openssl/rsa.py:236: UnsupportedAlgorithm ___________________________ 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 = 1695352403.7390215 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 = 1695352405.8625395 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 = 1695352409.959202 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.testQueryUDPFallbackWithSocket ___________________ sock = max_size = 65535, expiration = 1695352413.0223901 def _udp_recv(sock, max_size, expiration): """Reads a datagram from the socket. A Timeout exception will be raised if the operation is not completed by the expiration time. """ while True: try: > return sock.recvfrom(max_size) E BlockingIOError: [Errno 11] Resource temporarily unavailable dns/query.py:521: BlockingIOError During handling of the above exception, another exception occurred: self = def testQueryUDPFallbackWithSocket(self): for address in query_addresses: af = dns.inet.af_for_address(address) with socket.socket(af, socket.SOCK_DGRAM) as udp_s: udp_s.setblocking(0) with socket.socket(af, socket.SOCK_STREAM) as tcp_s: ll = dns.inet.low_level_address_tuple((address, 53)) tcp_s.settimeout(2) tcp_s.connect(ll) tcp_s.setblocking(0) qname = dns.name.from_text(".") q = dns.message.make_query(qname, dns.rdatatype.DNSKEY) > (_, tcp) = dns.query.udp_with_fallback( q, address, udp_sock=udp_s, tcp_sock=tcp_s, timeout=2 ) tests/test_query.py:225: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ dns/query.py:782: in udp_with_fallback response = udp( dns/query.py:706: in udp (r, received_time) = receive_udp( dns/query.py:624: in receive_udp (wire, from_address) = _udp_recv(sock, 65535, expiration) dns/query.py:523: in _udp_recv _wait_for_readable(sock, expiration) dns/query.py:265: in _wait_for_readable _wait_for(s, True, False, True, expiration) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ fd = , readable = True writable = False, _ = True, expiration = 1695352413.0223901 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 = 1695352416.254128, 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 = 1695352424.9170153, 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 ___________________ 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 = 1695352433.5386593, 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.11/socket.py:962: 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::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::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_ddr.py::test_basic_ddr_sync - AssertionError: assert False FAILED tests/test_ddr.py::test_basic_ddr_async - AssertionError: assert False FAILED tests/test_dnssec.py::DNSSECValidatorTestCase::testAbsoluteRSABad - cr... FAILED tests/test_dnssec.py::DNSSECValidatorTestCase::testAbsoluteRSAGood - c... FAILED tests/test_dnssec.py::DNSSECValidatorTestCase::testAlternateParameterFormats FAILED tests/test_dnssec.py::DNSSECValidatorTestCase::testDuplicateKeytag - c... FAILED tests/test_dnssec.py::DNSSECValidatorTestCase::testRelativeRSABad - cr... FAILED tests/test_dnssec.py::DNSSECValidatorTestCase::testRelativeRSAGood - c... FAILED tests/test_dnssec.py::DNSSECValidatorTestCase::testWildcardGoodAndBad FAILED tests/test_dnssec.py::DNSSECSignatureTestCase::testSignatureRSASHA1 - ... FAILED tests/test_dnssecalgs.py::DNSSECAlgorithm::test_rsa - cryptography.exc... 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_query.py::QueryTests::testQueryUDPFallbackWithSocket - dns.... 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 ============ 88 failed, 1157 passed, 53 skipped in 72.70s (0:01:12) ============ error: Bad exit status from /var/tmp/rpm-tmp.mIiFBH (%check) Bad exit status from /var/tmp/rpm-tmp.mIiFBH (%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.10/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.10/site-packages/mockbuild/util.py", line 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