Kid {minus} ElementTree
Kid no longer requires ElementTree. Many people think that Kid used it to do the XML parsing. This is simply incorrect. It was actually only used for the class interface. During the serialization process Element instances, as well as instances of other ElementTree classes, were used to represent the data. This was not a strong enough reason to depend on a 3rd party package.
This move does not imply in any way that I don’t like the ElementTree package. In fact that is my favorite package to use when manipulating XML data. I introduced it to AGI sometime ago and have heard nothing, but good things.
Kid 0.9.4 Released
A huge thank you to Christoph Zwerschke. Virtually all of the changes between 0.9.3 and 0.9.4 where made by Christoph. For more info on what changed please checkout the release notes.
Stay tuned. More great things will be coming in the near future.
Kid 0.9.3 Released
This was somewhat of a rush job to fix the issue in ticket #66. For a more detailed list of changes check out the release notes.
New Kid Domain Unveiled
Effective immediately Kid services will be moved over to kid-templating.org. This will give me the control I need to fix the spam issues plaguing the Trac instance as well as anything else that comes up.
The old Trac has been shut down and the old Subversion repository will remain around for a while in a read only state to not break anyone’s svn:internals. Using the new repository is as easy as doing an svn:switch. If you currently have a working copy please run the following command:
svn switch –relocate svn://lesscode.org/kid/trunk svn://kid-templating.org/trunk
Thanks for using Kid!
Trac Spam Sucks
Recently the Kid trac application has been under attack by spammers. At this time upgrading to the newest version and using the spam blocker plugin is not possible. So in the mean time I have written a script to help me delete the spam.
Running the script could be dangerous. There is always the possibility that you will delete real valid posts. To minimize the risk I make sure that I run it soom after the spam appears.
You simply run the script from the command line and pass it ticket ids or wiki page names as arguments.
./kill-last-wiki-spam WikiPage 100 109 OtherPage
The script will loop through the arguments and process them. Since code is more precise than language I’ll let you read it to find out how it works.
New Kid Release Schedule
Kid needed a more consistent release timeline. So in order to keep myself on track I added some new milestones and started to plan out the roadmap. If things go as planned I can start knocking out tickets and doing more frequent releases.
If you know of a ticket that you feel is important please make sure it is one of the scheduled 0.9.x milestones. The 0.10 really does not mean much at this point because there has not been any timeframe associated with it.
Kid Configuration Consolidation
As the work to simplify the Kid code base continues it became obvious to me that there needs to be a unified way to handle configuration options. Currently there are four ways that default options are set:
- Environment variables (e.g. KID_OUTPUT_PY)
- String literals (e.g. ‘utf-8′ hard coded in KidParser.__init__)
- Global variables in a module (e.g. assume_encoding in kid/__init__.py)
- Class attributes (e.g. Serializer.encoding)
Not only are there several ways to do the same thing, but there are subtle bugs lurking. For example, ticket #138 reports an issue caused by the implementation of the class attribute default options.
I have already started down the path toward reconciliation by creating the kid.properties module. The API is light weight and simply consists of get, set and isset functions. The next step is to start refactoring the code to use the new API.
Google Summer of Code 2006 Mentor
I have signed up to be a mentor and am looking to mentor projects related to Kid. I may also be willing to mentor projects related to Python web application servers or Python web services. It really depends on the proposal.
I have had a few email conversations with students about some interesting Kid projects. So we’ll see what happens next.
Kid 0.9.1 Released
This release is primarily to fix a couple of bugs, but it is also my first attempt at going through the release process. The plan is to start releasing more often. The GettingStarted wiki page will have more information of how to get Kid.
Thoughts on Kid
In the last few months I have spent a lot of time patching and extending Kid. During this time I have had to field lots of questions and complaints thrown at me.
The two things that seem to appear the most are concerns about Kid’s speed and it’s lack of good error messaging. I have given a lot of thought to the speed problems in the last few weeks and at PyCon 2006 I had the opportunity, along with Mike Pirnat, to start working on it.
We decided to focus on the speed issue, because that seems to be the thing that turns most people away. Kevin Dangoor also brought up the fact that changes to Kid’s internals may change the solution for the error reporting anyway.
I created a new branch where we could break stuff and not anger any users. Although there is still lots of work two do there were two big wins:
- Another developer understands some of Kid’s internals (which is not entirely easy!)
- Scripts and tests to help in determine the effect of changes
I have some other more interesting changes in my working copy of the pycon-sprint-2006 branch. After looking at the number of function calls and nested generators it is a pretty good assumption that this can be made faster. I am experimenting with unstreaming parts of Kid. Now since a rewrite Kid’s internals would take a long time and the changes may not help, I wanted to identify things that can be done quickly.
The first step is to eliminate the use of TEXT in the streaming
process. Instead I am attaching the text nodes to the text and tail attributes of elements. This is essentially what ElementTree does. Ideally this will lower the number of times that data will need to go through all of the generators thus speeding up the template.
I am planning on committing code more frequently that I am doing right now. This means that there will be times when the branch is broken. So use it at your own risk!








