-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump the dnspython version to 2.4.2 #16150
Bump the dnspython version to 2.4.2 #16150
Conversation
c11180e
to
8defd4d
Compare
8defd4d
to
733aed4
Compare
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
d233c39
to
e3bf2e6
Compare
b4e9c41
to
8d4de32
Compare
8d4de32
to
561ad77
Compare
assert answer.rrset.items[0].to_text() | ||
|
||
items = list(answer.rrset.items.keys()) if PY3 else answer.rrset.items | ||
assert items[0].to_text() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if what was originally intended was something like
assert items[0].to_text() | |
assert any(it.to_text() for it in items) |
That would make it independent of whether it's a list or a dict, and would seem easier to understand (otherwise, some comment explaining why the first element is so important here would be in order).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have the background, let's do it that way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now items
can be answer.rrset.items
without needing to check PY3
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦
What does this PR do?
Bump the dnspython version to 2.4.2 on Python 3.
I also paramtrized a test and adapted the mocks
Motivation
items
from a list to a dictAdditional Notes
Review checklist (to be filled by reviewers)
qa/skip-qa
label if the PR doesn't need to be tested during QA.