← Back to team overview

dulwich-users team mailing list archive

Re: Tree entries

 

Hi Dave,

On Thu, 2010-10-07 at 08:46 -0700, David Borowitz wrote:
> On Thu, Oct 7, 2010 at 06:57, Jelmer Vernooij <jelmer@xxxxxxxxx>
> wrote:
>         On Wed, 2010-10-06 at 14:19 -0700, David Borowitz wrote:
>         3 seems like the best solution if it doesn't make things too
>         much
>         slower. Of course, we could give it semantics similar to what
>         namedtuple
>         would give us.

> I don't mind much either way. It sounds like benchmark results will be
> the deciding factor.
Yeah. I also think it's important whatever we do will keep working with
older versions of Python. I'm quite surprised the namedtuple approach is
faster than slotted objects.

>         > In my ideal world we would get rid of Tree.entries() and
>         change
>         > index.commit_tree() to use the standard format, but I don't
>         have a
>         > sense of how widely either of those are used. Thoughts on
>         how to
>         > proceed?
>         
>         Changing commit_tree() is probably possible as it's not very
>         heavily
>         used. Removing Tree.entries() is not possible I think, at
>         least not
>         without deprecating it first.

> +1 to officially deprecating it. I thought it was kind of unofficially
> deprecated already. (There's two functions that are almost identical,
> one is implemented in terms of the other, and it's only for
> "historical reasons"--that's pretty much what a deprecated function
> looks like :)
It looks like we didn't actually have a "items" method though. I'm
adding one now.

Cheers,

Jelmer

Attachment: signature.asc
Description: This is a digitally signed message part


Follow ups

References