[PEAK] bulletins example OF DOOM

Stephen C. Waterbury golux at comcast.net
Mon Apr 12 15:22:49 EDT 2004


Phillip J. Eby wrote:

> No, you don't have progress.

You need to turn on irony-detection when reading my messages.  ;)

> 'Date' is not a DBAPI type constant.

Not in DBAPI 1.0, but DBAPI 1.0 has been "replaced", and 'DATE'
is no longer specified as a type constant -- 'DATE' does not occur
in the DBAPI 2.0 specification (PEP 249, which _replaces_ PEP 248).
'DATE' does occur in PEP 248, but if conventions that are part of
PEP 248 are supposed to be maintained in PEP 249, they should be
included in PEP 249 (otherwise, PEP 249 should not say "replaces
PEP 248"; "extends" maybe, but I would not advocate that approach
either, as it gets too confusing).

Since both psycopg and pyPgSQL claim to be DBAPI 2.0-compliant,
they should treat such type constant names as case-independent,
which is probably the best strategy in any case:  "Be liberal
in what you accept, conservative in what you send."

This is not just a quibble, since the PEAK approach (which I
like very much :) is designed to leverage meta model specifications.
If the DBAPI spec were more rigorous (and implemented rigorously ;),
PEAK could auto-generate these bindings, and we wouldn't be having
this conversation.

Nonetheless, I *DO* appreciate your help, Phillip!
You are telling me how it works in reality, which is
at this point much more valuable than knowing the spec.  :)

Thanks!  I am looking at pyPgSQL to see what it does.

Cheers,
Steve




More information about the PEAK mailing list