this is a known Python issue fixed in 2.6. See
http://www.sqlalchemy.org/trac/ticket/1138
for details.
On Jan 17, 2009, at 9:23 PM, James wrote:
>
> I'm using SA underneath a TurboGears 1.0 app. Upgrading SA from 0.4.3
> to 0.4.4 causes previously passing unit tests to fail when run in
> conjunction with nose's "coverage" plugin -- I've included an example
> stack trace below.
>
> The unit tests run just fine when not using nose's --with-coverage
> option.
>
> The only other useful information I have is that some basic logging
> shows that more of my model code is being run under 0.4.4 than under
> 0.4.3, when using coverage.
>
> I don't have a small reproduction, nor have I looked at this in lots
> of detail - before I do, is this a known issue, or does it can anyone
> suggest a good place for me to start debugging?
>
> Thanks!
> James
>
> Stacktrace:
>
> Traceback (most recent call last):
> File "/Users/james/virtual/queue/src/pull_client/tests/
> test_core_agent.py", line 29, in setUp
> self.search_server = model.SearchServer('test_internal',
> 'test_external', 'test_directory')
> File "/Users/james/virtual/queue/lib/python2.5/site-packages/
> SQLAlchemy-0.4.4-py2.5.egg/sqlalchemy/orm/attributes.py", line 1226,
> in init
> extra_init(class_, oldinit, instance, args, kwargs)
> File "/Users/james/virtual/queue/lib/python2.5/site-packages/
> SQLAlchemy-0.4.4-py2.5.egg/sqlalchemy/orm/mapper.py", line 733, in
> extra_init
> self.compile()
> File "/Users/james/virtual/queue/lib/python2.5/site-packages/
> SQLAlchemy-0.4.4-py2.5.egg/sqlalchemy/orm/mapper.py", line 237, in
> compile
> mapper.__initialize_properties()
> File "/Users/james/virtual/queue/lib/python2.5/site-packages/
> SQLAlchemy-0.4.4-py2.5.egg/sqlalchemy/orm/mapper.py", line 257, in
> __initialize_properties
> prop.init(key, self)
> File "/Users/james/virtual/queue/lib/python2.5/site-packages/
> SQLAlchemy-0.4.4-py2.5.egg/sqlalchemy/orm/interfaces.py", line 370, in
> init
> self.do_init()
> File "/Users/james/virtual/queue/lib/python2.5/site-packages/
> SQLAlchemy-0.4.4-py2.5.egg/sqlalchemy/orm/properties.py", line 181, in
> do_init
> sessionlib.register_attribute(class_, self.key, uselist=False,
> proxy_property=self.instrument, useobject=False,
> comparator=comparator)
> File "/Users/james/virtual/queue/lib/python2.5/site-packages/
> SQLAlchemy-0.4.4-py2.5.egg/sqlalchemy/orm/unitofwork.py", line 85, in
> register_attribute
> return attributes.register_attribute(class_, key, *args, **kwargs)
> File "/Users/james/virtual/queue/lib/python2.5/site-packages/
> SQLAlchemy-0.4.4-py2.5.egg/sqlalchemy/orm/attributes.py", line 1291,
> in register_attribute
> inst = proxy_type(key, proxy_property, comparator)
> File "/Users/james/virtual/queue/lib/python2.5/site-packages/
> SQLAlchemy-0.4.4-py2.5.egg/sqlalchemy/orm/attributes.py", line 123, in
> __init__
> self.descriptor = self.user_prop = descriptor
> AttributeError: can't set attribute
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---