Today I made a number of changes to the repository API:
- Some often called Repository methods were moved to a new C type called
CRepository, therefore you need to obtain the latest chandlerdb-0.5-13
system after your next svn update. (make chandlerdb)
- Two years ago, when I added threading support to the repository, the
RepositoryView class was carved out of the Repository class. To smooth the
transition many methods that belonged on RepositoryView remained defined
on Repository - they just delegated to the repository's current view for
the current thread.
This is no longer the case. I removed all such delegating methods and
fixed all the code - mostly unit tests - that was still using a
Repository instance instead of a RepositoryView instance to call find(),
findPath(), findUUID(), loadPack(), iterRoots(), commit(),
refresh(), cancel(), prune(), etc.., etc..
If I missed code somewhere, you should be getting a TypeError reporting a
missing method on a Repository instance. Please change this code to use a
RepositoryView instance instead. All unit tests passed and I managed to
send and receive mail.
The Repository instance is meant for creating, opening or closing the
repository, or managing views. All item related view operations are now
only available on RepositoryView instances.
- The notion of current view for a given thread is still there but is not
used by the repository code anymore. It remains available for convenience
only. The units tests, in particular, make heavy use of this convenience.
- The Item.__init__() constructor no longer accepts None for the parent
argument. The parent of repository roots is their view.
- The MailService class is now initialized with a view only. To obtain the
repository of a view, use view.repository. This was done to illustrate the
fact that the view is now the normal entrypoint for item operations.
Andi..
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "Dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/dev