20 Aug 11:38
Code working on SQLA 0.4.6 is breaking on SQLA 0.5beta3
From: Harish K Vishwanath <harish.shastry <at> gmail.com>
Subject: Code working on SQLA 0.4.6 is breaking on SQLA 0.5beta3
Newsgroups: gmane.comp.python.sqlalchemy.user
Date: 2008-08-20 09:39:15 GMT
Subject: Code working on SQLA 0.4.6 is breaking on SQLA 0.5beta3
Newsgroups: gmane.comp.python.sqlalchemy.user
Date: 2008-08-20 09:39:15 GMT
Hello,
I was using elixir 0.5.2 (SQL Alchemy 0.4.6) on Py 2.4.
All my model objects inherits from Entity as well as another baseobject specific to our application.
class User(elixir.Entity, application.baseobject):
...
...
It used to work fine.
Today I upgraded to SQLA 0.5 beta3 and elixir 0.6.1. The same code doesn't work anymore.
File "c:\Python24\lib\site-
I was using elixir 0.5.2 (SQL Alchemy 0.4.6) on Py 2.4.
All my model objects inherits from Entity as well as another baseobject specific to our application.
class User(elixir.Entity, application.baseobject):
...
...
It used to work fine.
Today I upgraded to SQLA 0.5 beta3 and elixir 0.6.1. The same code doesn't work anymore.
File "c:\Python24\lib\site-
packages\elixir-0.6.1-py2.4.egg\elixir\entity.py",
line 816, in setup_entities
File "c:\Python24\lib\site-packages\elixir-0.6.1-py2.4.egg\elixir\entity.py",
line 409, in setup_mapper
File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta3-py2.4.egg\sqlalchemy
\orm\__init__.py", line 623, in mapper
return Mapper(class_, local_table, *args, **params)
File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta3-py2.4.egg\sqlalchemy
\orm\mapper.py", line 196, in __init__
self.__compile_class()
File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta3-py2.4.egg\sqlalchemy
\orm\mapper.py", line 844, in __compile_class
manager = attributes.create_manager_for_cls(self.class_)
File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta3-py2.4.egg\sqlalchemy
\orm\attributes.py", line 1498, in create_manager_for_cls
existing_factories = collect_management_factories_for(class_)
File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta3-py2.4.egg\sqlalchemy
\orm\attributes.py", line 1604, in collect_management_factories_for
hierarchy = util.class_hierarchy(cls)
File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta3-py2.4.egg\sqlalchemy
\util.py", line 408, in class_hierarchy
for s in [_ for _ in c.__subclasses__() if _ not in hier]:
AttributeError: class IRObject has no attribute '__subclasses__'
IRObject is our app specific base class.
Any ideas?
Thanks,
Harish
line 816, in setup_entities
File "c:\Python24\lib\site-packages\elixir-0.6.1-py2.4.egg\elixir\entity.py",
line 409, in setup_mapper
File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta3-py2.4.egg\sqlalchemy
\orm\__init__.py", line 623, in mapper
return Mapper(class_, local_table, *args, **params)
File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta3-py2.4.egg\sqlalchemy
\orm\mapper.py", line 196, in __init__
self.__compile_class()
File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta3-py2.4.egg\sqlalchemy
\orm\mapper.py", line 844, in __compile_class
manager = attributes.create_manager_for_cls(self.class_)
File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta3-py2.4.egg\sqlalchemy
\orm\attributes.py", line 1498, in create_manager_for_cls
existing_factories = collect_management_factories_for(class_)
File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta3-py2.4.egg\sqlalchemy
\orm\attributes.py", line 1604, in collect_management_factories_for
hierarchy = util.class_hierarchy(cls)
File "c:\python24\lib\site-packages\SQLAlchemy-0.5.0beta3-py2.4.egg\sqlalchemy
\util.py", line 408, in class_hierarchy
for s in [_ for _ in c.__subclasses__() if _ not in hier]:
AttributeError: class IRObject has no attribute '__subclasses__'
IRObject is our app specific base class.
Any ideas?
Thanks,
Harish
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To post to this group, send email to sqlalchemy <at> googlegroups.com
To unsubscribe from this group, send email to sqlalchemy+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---
RSS Feed