bmuller / twistar

Twistar is an object-relational mapper (ORM) for Python that uses the Twisted library to provide asynchronous DB interaction.
http://findingscience.com/twistar
Other
132 stars 38 forks source link

Make type-checks 'future compatible' by using isinstance #68

Closed adrienguerard closed 8 years ago

adrienguerard commented 8 years ago

Previously type-checks were done by doing type(obj) is klass This doesn't take into account 'future' libs that use object inheritance to backport new features from 3 to 2 without breaking 2-only libs. Now type-checks are done using 'isinstance', which is a more relaxed type-check, but also the desired behavior typically.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 85.78% when pulling d1e886458af638a38d3ebb2ccccae49da7f5bc1b on adrienguerard:master into 69cd051bcf72c9b644a029ef08cfba11627b44da on bmuller:master.

adrienguerard commented 8 years ago

@bmuller Let me know once you're merged and pushed up to pypi; afaik same tests pass & run

bmuller commented 8 years ago

v1.5 now available on pypi