BIND 10 #1866: isc.dns constants like RRType.A() should be constants, not functions

BIND 10 Development do-not-reply at isc.org
Tue Jan 29 05:19:12 UTC 2013


#1866: isc.dns constants like RRType.A() should be constants, not functions
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  defect        |  jinmei
            Priority:  medium        |                       Status:
           Component:  libdns++      |  accepted
            Keywords:                |                    Milestone:
           Sensitive:  0             |  Sprint-20130205
         Sub-Project:  DNS           |                   Resolution:
Estimated Difficulty:  5             |                 CVSS Scoring:
         Total Hours:  0             |              Defect Severity:  N/A
                                     |  Feature Depending on Ticket:
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------

Comment (by jinmei):

 trac1866 is ready for review.

 As can be expected, the size of the diff is quite large, but the
 changes should be straightforward.

 The branch can be divided into several stages:

 - from 62bb1c4 to 3f74193 are the main part of the branch: I've
   extended the gen-rdatacode script so we can more easily make the C++
   and Python definitions consistent. (but for Opcde and Rcode I rather
   chose hardcoding at the risk of repeating ourselves as it should be
   very unlikely to see more cases)
 - from 56e9d0e to d985d0d are the trivial adjustments to other python
   code that used the old definition.  I've done this using the
   attached script; although many files were updated I believe it's
   easy to be confident about the changes if you see the script.
   taking and reviewing the actual diff would be still useful, though,
   and I also believe it looks quite trivial.
 - the rest (0479cb5 and beyond) is an optional extension: I've also
   solved the issue of #2409 as I found it possible with a small
   additional extension on top of this branch and the branch so far
   should be easy to understand.

 But if the last part is controversial or the branch looks too big even
 without it, I'm okay with differing that part.

 Proposed changelog/news entry:
 {{{
 562.?   [func]*         jinmei
         libdns++/Python isc.dns: In Python isc.dns, function style
         constants for RRType, RRClass, Rcode and Opcode were deprecated
         and replaced with straightforward object constants, e.g., from
         RRType.AAAA() to RRType.AAAA.  This is a backward incompatible
         change.  Also, these constants are now more consistent between C++
         and Python, and RRType constants for all currently standardized
         types are now supported (even if Rdata for these are not yet
         available).
         (Trac #1866 and #2409, git TBD)
 }}}
 (This includes the additional extension part)

-- 
Ticket URL: <http://bind10.isc.org/ticket/1866#comment:11>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list