Bug 1561187
Summary: | Cannot import DNS with Python 3 in Koji builds | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Randy Barlow <rbarlow> |
Component: | python3-py3dns | Assignee: | Randy Barlow <rbarlow> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | infra-sig, pwouters, rbean |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | python3-py3dns-3.1.1-5.fc29 python3-py3dns-3.1.1-5.fc28 python3-py3dns-3.1.1-3.fc26 python3-py3dns-3.1.1-4.fc27 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-04-03 13:25:12 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Randy Barlow
2018-03-27 20:42:10 UTC
Here is a simple reproducer:
$ sudo mv /etc/resolv.conf /etc/resolv.conf.bak
$ $ python3
Python 3.6.4 (default, Mar 13 2018, 18:16:01)
[GCC 7.3.1 20180130 (Red Hat 7.3.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import DNS
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/DNS/Base.py", line 53, in ParseResolvConf
with open(resolv_path, 'r') as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/resolv.conf'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.6/site-packages/DNS/__init__.py", line 37, in <module>
Base._DiscoverNameServers()
File "/usr/lib/python3.6/site-packages/DNS/Base.py", line 88, in _DiscoverNameServers
return ParseResolvConf()
File "/usr/lib/python3.6/site-packages/DNS/Base.py", line 56, in ParseResolvConf
warnings.warn(e)
TypeError: expected string or bytes-like object
I can confirm that my proposed fix also works (wrapping e in str(e)): $ python3 -c "import DNS" /usr/lib/python3.6/site-packages/DNS/Base.py:100: DeprecationWarning: 'async' and 'await' will become reserved keywords in Python 3.7 self.async=None /usr/lib/python3.6/site-packages/DNS/Base.py:462: DeprecationWarning: invalid escape sequence \s res_re = re.compile('^\s+nameserver[]0-9[]*\s*\:\s*(\S+)$') /usr/lib/python3.6/site-packages/DNS/Base.py:56: UserWarning: [Errno 2] No such file or directory: '/etc/resolv.conf' warnings.warn(str(e)) I just realized I filed this against the wrong package. python3-py3dns-3.1.1-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-298a67e758 python3-py3dns-3.1.1-5.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-25633cbab8 python3-py3dns-3.1.1-4.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-5be5753594 python3-py3dns-3.1.1-5.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-25633cbab8 python3-py3dns-3.1.1-3.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-298a67e758 python3-py3dns-3.1.1-4.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-5be5753594 python3-py3dns-3.1.1-5.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report. python3-py3dns-3.1.1-3.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report. python3-py3dns-3.1.1-4.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report. |