Updated to support newer Python and SQLA versions