{"action":"created","issue":{"url":"https://api.github.com/repos/Deepwalker/aldjemy/issues/15","labels_url":"https://api.github.com/repos/Deepwalker/aldjemy/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/Deepwalker/aldjemy/issues/15/comments","events_url":"https://api.github.com/repos/Deepwalker/aldjemy/issues/15/events","html_url":"https://github.com/Deepwalker/aldjemy/issues/15","id":35102499,"number":15,"title":"Exception when used with SQLAlchemy 0.9.4","user":{"login":"erikcw","id":113129,"avatar_url":"https://avatars.githubusercontent.com/u/113129?v=3","gravatar_id":"","url":"https://api.github.com/users/erikcw","html_url":"https://github.com/erikcw","followers_url":"https://api.github.com/users/erikcw/followers","following_url":"https://api.github.com/users/erikcw/following{/other_user}","gists_url":"https://api.github.com/users/erikcw/gists{/gist_id}","starred_url":"https://api.github.com/users/erikcw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikcw/subscriptions","organizations_url":"https://api.github.com/users/erikcw/orgs","repos_url":"https://api.github.com/users/erikcw/repos","events_url":"https://api.github.com/users/erikcw/events{/privacy}","received_events_url":"https://api.github.com/users/erikcw/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-06-05T22:04:58Z","updated_at":"2015-06-30T08:08:29Z","closed_at":"2014-06-11T21:09:53Z","body":"I'm trying to use aldjemy with SQLAlchemy 0.9.4.  When I try a simple query, I get this traceback:\r\n\r\n\r\n```python\r\n\r\nfrom django.contrib.auth.models import User\r\nUser.sa.query(User.sa).count()\r\n\r\n---------------------------------------------------------------------------\r\nAttributeError                            Traceback (most recent call last)\r\n<ipython-input-1-01a7a3ebfca2> in <module>()\r\n----> 1 User.sa.query(User.sa).count()\r\n\r\n/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/sqlalchemy/orm/query.pyc in count(self)\r\n   2591         \"\"\"\r\n   2592         col = sql.func.count(sql.literal_column('*'))\r\n-> 2593         return self.from_self(col).scalar()\r\n   2594 \r\n   2595     def delete(self, synchronize_session='evaluate'):\r\n\r\n/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/sqlalchemy/orm/query.pyc in scalar(self)\r\n   2390         \"\"\"\r\n   2391         try:\r\n-> 2392             ret = self.one()\r\n   2393             if not isinstance(ret, tuple):\r\n   2394                 return ret\r\n\r\n/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/sqlalchemy/orm/query.pyc in one(self)\r\n   2359 \r\n   2360         \"\"\"\r\n-> 2361         ret = list(self)\r\n   2362 \r\n   2363         l = len(ret)\r\n\r\n/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/sqlalchemy/orm/loading.pyc in instances(query, cursor, context)\r\n     63                 break\r\n     64         else:\r\n---> 65             fetch = cursor.fetchall()\r\n     66 \r\n     67         if custom_rows:\r\n\r\n/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/sqlalchemy/engine/result.pyc in fetchall(self)\r\n    786             self.connection._handle_dbapi_exception(\r\n    787                                     e, None, None,\r\n--> 788                                     self.cursor, self.context)\r\n    789 \r\n    790     def fetchmany(self, size=None):\r\n\r\n/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/sqlalchemy/engine/base.pyc in _handle_dbapi_exception(self, e, statement, parameters, cursor, context)\r\n   1109                                 )\r\n   1110 \r\n-> 1111             util.reraise(*exc_info)\r\n   1112 \r\n   1113         finally:\r\n\r\n/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/sqlalchemy/engine/result.pyc in fetchall(self)\r\n    781         try:\r\n    782             l = self.process_rows(self._fetchall_impl())\r\n--> 783             self.close()\r\n    784             return l\r\n    785         except Exception as e:\r\n\r\n/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/sqlalchemy/engine/result.pyc in close(self, _autoclose_connection)\r\n    541             if _autoclose_connection and \\\r\n    542                 self.connection.should_close_with_result:\r\n--> 543                 self.connection.close()\r\n    544             # allow consistent errors\r\n    545             self.cursor = None\r\n\r\n/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/sqlalchemy/engine/base.pyc in close(self)\r\n    635         else:\r\n    636             if not self.__branch:\r\n--> 637                 conn.close()\r\n    638             if conn._reset_agent is self.__transaction:\r\n    639                 conn._reset_agent = None\r\n\r\n/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/sqlalchemy/pool.pyc in close(self)\r\n    781         self._counter -= 1\r\n    782         if self._counter == 0:\r\n--> 783             self._checkin()\r\n    784 \r\n    785 \r\n\r\n/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/sqlalchemy/pool.pyc in _checkin(self)\r\n    664     def _checkin(self):\r\n    665         _finalize_fairy(self.connection, self._connection_record,\r\n--> 666                             self._pool, None, self._echo, fairy=self)\r\n    667         self.connection = None\r\n    668         self._connection_record = None\r\n\r\n/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/sqlalchemy/pool.pyc in _finalize_fairy(connection, connection_record, pool, ref, echo, fairy)\r\n    564 \r\n    565     if connection_record:\r\n--> 566         connection_record.checkin()\r\n    567 \r\n    568 \r\n\r\n/Users/erik/.virtualenvs/proj/lib/python2.7/site-packages/sqlalchemy/pool.pyc in checkin(self)\r\n    455         connection = self.connection\r\n    456         pool = self.__pool\r\n--> 457         while self.finalize_callback:\r\n    458             finalizer = self.finalize_callback.pop()\r\n    459             finalizer(connection)\r\n\r\nAttributeError: '_ConnectionRecord' object has no attribute 'finalize_callback'\r\n```\r\n\r\nSame exception regardless of the type of query I attempt.  What is needed to make aldjemy compatible with the current release of SQLAlchemy?"},"comment":{"url":"https://api.github.com/repos/Deepwalker/aldjemy/issues/comments/117050305","html_url":"https://github.com/Deepwalker/aldjemy/issues/15#issuecomment-117050305","issue_url":"https://api.github.com/repos/Deepwalker/aldjemy/issues/15","id":117050305,"user":{"login":"ojomio","id":6757091,"avatar_url":"https://avatars.githubusercontent.com/u/6757091?v=3","gravatar_id":"","url":"https://api.github.com/users/ojomio","html_url":"https://github.com/ojomio","followers_url":"https://api.github.com/users/ojomio/followers","following_url":"https://api.github.com/users/ojomio/following{/other_user}","gists_url":"https://api.github.com/users/ojomio/gists{/gist_id}","starred_url":"https://api.github.com/users/ojomio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ojomio/subscriptions","organizations_url":"https://api.github.com/users/ojomio/orgs","repos_url":"https://api.github.com/users/ojomio/repos","events_url":"https://api.github.com/users/ojomio/events{/privacy}","received_events_url":"https://api.github.com/users/ojomio/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T08:08:29Z","updated_at":"2015-06-30T08:08:29Z","body":"@erikcw , err, I'm afraid the most relevant part of it is \r\n\r\n'_ConnectionRecord' object has no attribute 'starttime'\r\n```\r\nC:\\Python34\\lib\\site-packages\\sqlalchemy\\pool.py in _invalidate\r\n        if not rec or self._invalidate_time < rec.starttime: ...\r\n▼ Local vars\r\nVariable\tValue\r\nrec\t<aldjemy.core._ConnectionRecord object at 0x0735E730>\r\nconnection\t<sqlalchemy.pool._ConnectionFairy object at 0x0735E770>\r\nexception\tInterfaceError('connection already closed',)\r\nself\t<aldjemy.core.DjangoPool object at 0x048915F0>\r\n```"}}