#431087: Packages iteration return dictionaries

Stefano Zacchiroli zack at debian.org
Sun Jul 1 07:55:12 UTC 2007


On Sat, Jun 30, 2007 at 07:22:44PM -0600, John Wright wrote:
> > Yes, the issue is with the module location though. python-deb822 puts
> > deb822 as a top level module, so it is
> > 
> >   import deb822
> > 
> > whereas the other modules in python-debian live in the debian_bundle
> > package,
> > 
> >   from debian_bundle import debtags
> > 
> > so it is just an issue of consistency.

Yep. Just my 0.02€, but I would prefer to see deb822 inside
debian_bundle. My proposal is to make it work both inside and outside
and document (via examples, which seem to be our only source of
documentation ATM) only the API which is "inside" debian_bundle.

This way you are reasonably sure that new code is going to be written
using the "consistent" API, but still don't break old code. ( Still,
talking about "breaking code" is something which scares me a bit, since
IMO we have room of improvements over the current APIs, but we can do
that if too constrained to backward compatibility ... )

In addition we can also print the usual deprecation warning when one
uses the "outside" API.

What do you think of this solution?

> If people object to it being a top-level module rather than inside
> debian_bundle, I don't think we'd affect too many people by moving it.

Then I vote to just move inside and that's it ...

> An interesting question, if slightly off-topic: why a debian_bundle
> package, rather than just a debian package, e.g.:
> 
>   from debian import debtags 
>
> Since we produce a binary called python-debian, it would make sense if
> the package we provide is called debian, rather than debian_bundle.
> (If this was discussed previously, sorry for bringing it back up...)

Ah, good question, I asked it myself a lot of times :) I'm totally in
favor of renaming to debian, if that is what you are suggesting ;)

Cheers.

-- 
Stefano Zacchiroli -*- PhD in Computer Science ............... now what?
zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/
(15:56:48)  Zack: e la demo dema ?    /\    All one has to do is hit the
(15:57:15)  Bac: no, la demo scema    \/    right keys at the right time
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-python-debian-discuss/attachments/20070701/e9287eb0/attachment.pgp 


More information about the pkg-python-debian-discuss mailing list