[I18n-sig] Intro + Encoding names issue

M.-A. Lemburg mal@lemburg.com
Sat, 27 Oct 2001 17:16:02 +0200


Matt Gushee wrote:
> 
> M.-A. Lemburg writes:
>  > Matt Gushee wrote:
>  > >
>  > > So the ideal would be a solution that allowed codecs developers to
>  > > maintain separate packages, but have their component modules "plugged
>  > > in" to the encodings namespace on installation.
>  > >
>  > > Apparently the above is impossible or at least very difficult with
>  > > Distutils. Maybe a workable compromise would be to have some sort of
>  > > codecs installation utility that would let end users, in one simple
>  > > step, insert a set of codecs into the main encodings namespace.
>  >
>  > Just put an application specific codec search function into
>  > Ft.__init__ and have this search function do the aliasing you wish
>  > to have in place.
> 
> I appreciate the suggestion, and I will do this if I have to. But I
> was hoping for some discussion of:
> 
>     1) whether it is appropriate to put the burden of creating aliases
>        on either application developers or end users (and you probably
>        gathered that I think it isn't); and
> 
>     2) assuming we would like people to be able to use standard
>        encoding names without creating their own aliases, is there a
>        way to accomplish this goal and still allow language-specific
>        codecs sets to be maintained as separate packages?

I don't really see how except by proposing to add the packaged
codec names to encodings/aliases.py. This should be acceptable
for those codec packages which are well-accepted and maintained,
e.g. we could add aliases for Tamito's Japanese package under the
standard encoding names for the supported codecs. The imports would
still fail in case the user forgot to install that package, though
(which is good, IMHO).

What I don't like is adding some kind of magic which goes on behind
the scenes. If things then go wrong, finding the cause of the problem
would be much harder.

If everybody agrees with pointing Python at Tamito's package for the
encodings he supports in his package, then I think we should simply
add these aliases to the core encodings package. He did a great
job on those codecs and the licenses fit in as well.

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Consulting & Company:                           http://www.egenix.com/
Python Software:                        http://www.lemburg.com/python/