maxmind/GeoIP2-python — pull request #7 by kecaps (2014-02-06 02:06:21+00:00)
Title: fixed import dependencies in geoip2.models

In using geoip2.database outside of database_test, AttributeError was being raised instead of AddressNotFoundError since geoip2.errors was not imported. geoip2.database should be responsible for loading all of its dependencies, and not depend on the caller for that. Having geoip2.errors imported in database_test masked this missing dependency.

I removed the import from database_test, verified that the existing tests exhibited the problem I was having, and then added the import into database.py, and verified that the tests were running cleanly again.