Maciej Wisniowski wrote:
I've just tried to use Zope3.3.0 with cx_Oracle adapter
and to check whether connection works I've used
typical for Oracle statement:

select 1 from dual

I've received error:
TypeError: __slots__ must be identifiers

The problem is (I think) with class Row or
RowClassFactory defined
in zope/rdb/

Right, the RowClassFactory appears to assume that the column names are valid Python identifiers, "1" is not. That doesn't seem like a good assumption to me.

A workaround would be to rename any offending columns (forgive my rusty SQL if this isn't quite right):

  select 1 as one from dual

I've implemented temporary solution that simply changes
the names of numeric attributes (like '1') to prefixed ones
(like '_1') It works but I'm not sure whether it is proper
solution for something other than tests, but in general
who may use this kind of dynamically created labels for
something useful...?

Personally, I don't see zope.rdb being as very useful and would expect to see third-party RDB interfaces supersede it.

I would like to know your's opinions
before submiting a bug and/or trying to create a patch.

I'd submit a bug report with the details you included in your email.
Benji York
Senior Software Engineer
Zope Corporation
Zope3-users mailing list

Reply via email to