On Jan 31, 2013, at 4:45 AM, George Sakkis wrote: > > Here's the relevant stacktrace: > > File "/home/gsakkis/pdo/.virtualenv_pypy/site-packages/sqlalchemy/ > orm/session.py", line 275, in _restore_snapshot > self.session._update_impl(s) > File "/home/gsakkis/pdo/.virtualenv_pypy/site-packages/sqlalchemy/ > orm/session.py", line 1621, in _update_impl > self._attach(state) > File "/home/gsakkis/pdo/.virtualenv_pypy/site-packages/sqlalchemy/ > orm/session.py", line 1649, in _attach > % (mapperutil.state_str(state), state.key)) > InvalidRequestError: Can't attach instance <MyModel at 0x87fcc60>; > another instance with key (<class 'my_package.MyModel'>, (8L, 1L)) is > already present in this session. > > "MyModel" is a declarative_base() subclass. By the way the exception > is not raised consistently, sometimes the test passes.
This issue seems vaguely familiar and I feel like I would have done something about it when it was reported....ah this is #2583. It's fixed in 0.7.10 (if/when I release that) and is in all released 0.8 versions as well. >>> >> >> Our own test suite has a lot of performance issues with Pypy, not sure if >> due to memory or JIT crunching or what, I reported it to their bug tracker >> at the request of their developers. > > Do you happen to run coverage along with tests (--with-xcoverage)? If > yes that must be the reason; at least in our case removing the > coverage reduced the overhead from 10x the time of CPython down to > ~15%. ah. we've got it with "--with-coverage", let me try taking that out! -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.