Rewrote compatibility logic to use __future__ module