On Feb 8, 1:26 pm, "Edward K. Ream" <[email protected]> wrote:
> Test-driven development makes possible a step-by-step conversion plan: Step 7 is now on the trunk. To see all the steps, with the diffs at each step, use bzr qlog. As the recent bug report shows, TDD doesn't guarantee the absence of bugs, just the absence of bugs covered by unit tests :-) I finish step 7 late last night. c.cacher (that is pickleshareDB) no longer depends on the path (aka Path) class. It's always a close call whether to eliminate dependencies on code. Removing the path code required massive changes to the pickleshareDB code. There is a strong temptation to leave well enough alone. So why did I do it? For two reasons. 1.The path class uses os.path functions which do not work properly on Python 2.x with unicode paths. Thus, imo, last night's work fixed bugs. 2. The work makes it possible to reduce pickleshareDB to its essence. As Ville said a few days ago, the c.cacher class calls only a few pickleshareDB methods. Now I am in a position to say exactly which ones. They are the ctor, clear, get/__getitem__, __setitem__ (the db[key] value syntax), in/__contains__. Leo's clear-cache commands will use del/__delitem__. Only the unit test calls hset and uncache; both will be removed. Most other methods can and will be eliminated. At present, leoCache.py contains top-level functions adapted from the Path class. All these can go if we can eliminate the call to makedirs in the __setitem__ method. This is easily done: we can replace makedirs by g.makeAllNonExistentDirectories(force=True). Finally, the PickleShareLink class can be eliminated. I'll finish this project today. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
