You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that Message.flags attribute on messages produced by message.make_query() is EnumInt, but it is a plain int on answers from dns.resolver.resolve(). I'm not sure if this was intentional in 2.0 or not. If it is an omission (i.e. not omitted for compatibility reasons) I can prepare a PR to use EnumInt on responses as well.
In [10]: q = dns.message.make_query('.', 'NS')
In [11]: q.flags
Out[11]: <Flag.RD: 256>
In [20]: import dns.message
In [21]: r = dns.resolver.resolve('.', 'NS')
In [22]: r.response.flags
Out[22]: 33152
In [23]: type(r.response.flags)
Out[23]: int
In [24]: dns.flags.Flag(r.response.flags)
Out[24]: <Flag.QR|RD|RA: 33152>
The text was updated successfully, but these errors were encountered:
Flags is not an enum value, it's just or'd up from enum values, so if anything a single flag should be a pure int not an EnumInt. But EnumInts are just subclasses of int, so it's fine as is I think.
It seems that
Message.flags
attribute on messages produced bymessage.make_query()
isEnumInt
, but it is a plain int on answers fromdns.resolver.resolve()
. I'm not sure if this was intentional in 2.0 or not. If it is an omission (i.e. not omitted for compatibility reasons) I can prepare a PR to use EnumInt on responses as well.Version: 49a75f4
Reproducer:
The text was updated successfully, but these errors were encountered: