What APIs to check versions of?

Jelmer Vernooij jelmer at samba.org
Tue Oct 7 16:52:17 BST 2008


Hi Rob,

Thanks for providing fixes for those bzrlib.api functions. There doesn't
appear to be a lot of documentation as to of what objects I should check
the API. Can you please comment?

There are a few obvious ones:

bzrlib.config.AuthenticationConfig
bzrlib.config.TreeConfig
bzrlib.config.GlobalConfig
bzrlib.config.LocationConfig
bzrlib.command.Command
bzrlib.option.Option
bzrlib.transport.Transport
bzrlib.bzrdir.BzrDir
bzrlib.bzrdir.BzrDirFormat
bzrlib.bzrdir.Converter
bzrlib.inventory.Inventory
bzrlib.repository.RepositoryFormat
bzrlib.repository.Repository
bzrlib.repository.InterRepository
bzrlib.repository.RootCommitBuilder
bzrlib.branch.Branch
bzrlib.branch.BranchFormat
bzrlib.workingtree.WorkingTree
bzrlib.workingtree.WorkingTreeFormat
bzrlib.revisionspec.RevisionSpec
bzrlib.tag.BasicTags
bzrlib.revision.Revision
bzrlib.registry.Registry
bzrlib.branch.BranchCheckResult
bzrlib.branch.PullResult
bzrlib.lockdir.LockDir
bzrlib.versionedfile.VersionedFiles
bzrlib.revisiontree.RevisionTree

What about e.g. custom log handlers? Should I check bzrlib.log or
bzrlib.log.properties_handler_registry or something else?

What about e.g. utility modules like urlutils? Are those guaranteed to
just never break API? Should I check the API version of each individual
function or perhaps of the module? The latter should be doable, the
first would be very impractical (and tricky to make sure we check for
each function). 

Would it perhaps make sense for the get_.*_api functions to check
recursively up until it finds an object that has an API version set?
E.g. when invoked on bzrlib.branch.Branch, first check
bzrlib.branch.Branch, then bzrlib.branch, then bzrlib.

Cheers,

Jelmer
-- 
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
Jabber: jelmer at jabber.fsfe.org




More information about the bazaar mailing list