BIND 10 #905: TSIG: complete python library update
BIND 10 Development
do-not-reply at isc.org
Tue May 10 19:40:23 UTC 2011
#905: TSIG: complete python library update
-------------------------------------+-------------------------------------
Reporter: | Owner: jinmei
jinmei | Status: accepted
Type: | Milestone:
enhancement | Sprint-20110517
Priority: major | Resolution:
Component: | Sensitive: 0
DNSPacket API | Sub-Project: DNS
Keywords: | Estimated Difficulty: 4.0
Defect Severity: N/A | Total Hours: 0
Feature Depending on Ticket: |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by jinmei):
Branch trac905 is ready for review.
This is the second set of changes for the TSIG python library.
As I noted in the daily status jabber room, I wanted to introduce some
cleanup with this change, and I decided to make an intermediate
subtask to keep the size of code to be reviewed.
The first cleanup point is to use separate .cc and .h files for python
class bindings rather than having all implementation files through
#include in the main pydnspp.cc. This approach requires careful
consideration of inclusion ordering, which is becoming a difficult
task as the binding gets bigger. It's also error prone because we
sometimes use 'using namespace' in .cc files, but with this approach
this means doing so before including some other header files, which is
generally considered a bad practice.
The second cleanup is to introduce helper utilities to use the python
C API more safely (and hopefully more easily). I've written my
motivation in lit/util/python/pycppwrapper_util.h in detail.
Another cleanup is to introduce a template of the python binding
code. I found many of the binding code has the same pattern, so
rather than copy-paste-editing an existing one I thought it would make
more sense to have a single real template and generate a more complete
initial file. They are in lib/util/python/, too.
Regarding the main topic of this task, I've only added one small C++
class, TSIGError, mainly to show how the cleanups work (for which I'll
create a yet another ticket). I'd like to get this set of changes
reviewed, while I work on developing the rest of the bindings.
--
Ticket URL: <http://bind10.isc.org/ticket/905#comment:4>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list