dgilland/alchy — pull request #11 by seth-p (2014-10-23 21:58:54+00:00)
Title: Made __table_args__ & __mapper_args__ recursive functions.

A few things.
1. I followed the recipe in http://stackoverflow.com/questions/23415638/combining-table-args-with-constraints-from-mixin-classes-in-sqlalchemy to define ``__table_args__`` and ``__mapper_args__`` in ``ModelBase``, though had to modify it to avoid infinite loops. Depending on how one wants to treat nested mixins, one may want to uncomment the two ``or not ModelBase.__subclasscheck__(mixin)`` clauses. Or one may want to follow a different recipe. I don't feel strongly. I also have no idea if any of this should go in ``ModelMeta`` instead. I haven't added any tests.
2. I cleaned up the ``and field in update_fields`` business.
3. I changed ``camelcase_to_underscore()`` to use a single regular expression, per the second comment in http://stackoverflow.com/questions/1175208/elegant-python-function-to-convert-camelcase-to-camel-case. Not only is it shorter, it's also about 20% faster. It produces identical results.

I based the code on ``dgilland:develop``, but can easily rebase on ``dgilland:master``.