[Python-Dev] packaging

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Mar 16 00:46:08 CET 2011


Tarek Ziadé wrote:

> try:
>     from __future__ import or_importer
> except ImportError:
>     XXX <-- previous proposal
>  else:
>     or based proposal

This could easily be fixed if we allowed run-time access
to the time machine:

   from __future__ import temporal_mechanics, or_importer
   import timemachine
   timemachine.backport_feature("or_importer", from_version = "3.4")
   ...

(For obvious reasons, this will work despite the future
import of or_importer occurring before the code that
backports it.)

Manual use of the time machine would be required to
backport the timemachine module itself, after which
there would never be any backwards compatibility
problems again.

-- 
Greg


More information about the Python-Dev mailing list