<div dir="ltr"><div><div><div>Hi;<br><br></div>I have been using <b>megrok.rdb</b> for a while, but found previously that although it worked well it only worked while pinned to versions < 0.7.0 of SQLAlchemy.<br><br></div>I finally got irritated enough to go find what the problem was.  It turns out its something really stupid and innocuous.<br><br></div><div>sqlalchemy.orm.collections.collection implements a decorator called <b><i>on_link(fn)</i></b>.  Megrok.rdb traps <b><i>on_link()</i></b> to force an <i>ILocation</i> interface compliance for linked tables.  In sqlalchemy 0.7.0, the name of this method was changed from <b><i>on_link()</i></b> to just <b><i>link()</i></b>.<br><br></div><div>I just wish devs would recognise the far reaching consequences of changing public API's that are already in use!<br><br></div><div>Anyway, having done a quick search through github, it seems that megrok.rdb is not amongst the projects held there, so there's no easy way for me to do a pull request.  The package owner in the pypi repository is listed as   <span>faassen, kteague.   Faassen, I know, has moved on to the bigger and better world of <i>morepath</i>.<br><br></span></div><div><span>I would like to submit a patch to megrok.rdb to enable compatibility with more recent versions of SQLAlchemy, and simultaneously drop support for versions of SQLAlchemy < 0.7.0.  The patch is simply:<br><br> <span style="font-family:monospace,monospace">components.py components_new.py <br>--- components.py    2017-03-09 09:39:30.670965306 +0200<br>+++ components_new.py    2017-03-09 09:38:22.010966138 +0200<br>@@ -59,8 +59,8 @@<br>             keyfunc = default_keyfunc<br>         MappedCollection.__init__(self, keyfunc=keyfunc)<br> <br>-    @collection.on_link<br>-    def on_link(self, adapter):<br>+    @collection.link<br>+    def link(self, adapter):<br>         if adapter is not None:<br>             self.__parent__ = adapter.owner_state.obj()<br>             self.__name__ = unicode(adapter.attr.key)<br></span><br></span></div><div><span>I have no idea who is really maintaining this module, if anyone, but could whoever it is please take a look.<br></span></div><div><span><br><br><br></span></div></div>