use set ops in sqlalchemy/orm/mapper.py - prevents TypeError
This MAY be related to changes in #965, however, I had to make the following change. The program worked without change with 4.0.0. The same problem shows up in 0.4.2b, and possibly earlier versions.
The traceback:
File "/usr/lib/python2.3/site-packages/SQLAlchemy-0.4.2p3-py2.3.egg/sqlalchemy/orm/init.py", line 544, in mapper return Mapper(class_, local_table, args, *params) File "/usr/lib/python2.3/site-packages/SQLAlchemy-0.4.2p3-py2.3.egg/sqlalchemy/orm/mapper.py", line 160, in init self._compile_pks() File "/usr/lib/python2.3/site-packages/SQLAlchemy-0.4.2p3-py2.3.egg/sqlalchemy/orm/mapper.py", line 416, in _compile_pks if t.primary_key and pk_cols.issuperset(t.primary_key): File "/usr/lib/python2.3/sets.py", line 318, in issuperset self._binary_sanity_check(other) File "/usr/lib/python2.3/sets.py", line 343, in _binary_sanity_check raise TypeError, "Binary operation only permitted between sets" TypeError: Binary operation only permitted between sets
The change will be added as a file.
Comments (7)
-
Account Deleted -
repo owner hi -
all of the Set objects we use are custom to SQLAlchemy when using Python 2.3 at this point (jek has made those changes recently); have you tried the trunk ?
also shouldn't this ticket be a continuation of
#956? -
- changed status to duplicate
This was fixed on the trunk in the post 0.4.p3 python 2.3 fixup, see
#956. -
Account Deleted - removed status
- changed status to open
Are you sure this ix fixed? I don't see this particular file or change in the changesets mentioned in
#956. -
- changed status to resolved
yep.
-
repo owner the patch you posted wasn't used.
issuperset
is reimplemented at: source:/sqlalchemy/trunk/lib/sqlalchemy/util.py@4080#L34 -
Account Deleted Thanks for the explanation!
- Log in to comment
I meant
#956, sorry.