def with_metaclass(meta, base=object):
    return meta("%sBase" % meta.__name__, (base,), {})
################################################


# produce a wrapper that allows encoded text to stream
# into a given buffer, but doesn't close it.
# not sure of a more idiomatic approach to this.
Create a base class with a metaclass.
dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/alembic/compat.py/with_metaclass