[DB-SIG] Re: [Psycopg] GPL or LGPL

Gerhard Häring haering_postgresql@gmx.de
Wed, 2 Oct 2002 09:07:06 +0200

* Magnus Lycka <magnus@thinkware.se> [2002-10-02 08:52 +0200]:
> At 01:19 2002-10-02 +0200, Federico Di Gregorio wrote:
> >let's restate the problem: bash is GPL'ed. should *any* sh script be
> >released under the GPL? or only the ones using bash extensions to
> >standard bourne shell? and why is python (and its extension psycopg)
> >diferent from a shell?
> Do you suggest that a python program that is written for vanilla
> DB-API 2 and happens to work with psycopg could be proprietary, but a
> python program that uses unique features in psycopg can not?

In Python, you're always coding against an interface, never directly
linking against an implementation. If there is a module in the search
path that you can import under a name not entirely unlike an existing
GPLed module, that's certainly not my problem, right?

You can make the usage of the interface more explicit, like with:

    MODNAME = "psycopg"
    mod = __import__(MODNAME)
    con = getattr(mod, "connect")
    apply(con, ...)

but this is really just the same as:

    import psycopg
    con = psycopg.connect(...)

But you're still only using an interface with certain names and
parameter conventions.

-- Gerhard