1. 30 Jun, 2010 8 commits
  2. 29 Jun, 2010 14 commits
  3. 28 Jun, 2010 16 commits
  4. 27 Jun, 2010 2 commits
    • Brett Cannon's avatar
      Implement importlib.abc.SourceLoader and deprecate PyLoader and PyPycLoader. · af8f9ab3
      Brett Cannon authored
      SourceLoader is a simplification of both PyLoader and PyPycLoader. If one only
      wants to use source, then they need to only implement get_data and
      get_filename. To also use bytecode -- sourceless loading is not supported --
      then two abstract methods -- path_mtime and set_data -- need to be implemented.
      Compared to PyLoader and PyPycLoader, there are less abstract methods
      introduced and bytecode files become an optimization controlled by the ABC and
      hidden from the user (this need came about as PEP 3147 showed that not treating
      bytecode as an optimization can cause problems for compatibility).
      
      PyLoader is deprecated in favor of SourceLoader. To be compatible from Python
      3.1 onwards, a subclass need only use simple methods for source_path and
      is_package. Otherwise conditional subclassing based on whether Python 3.1 or
      Python 3.2 is being is the only change. The documentation and docstring for
      PyLoader explain what is exactly needed.
      
      PyPycLoader is deprecated also in favor of SourceLoader. Because PEP 3147
      shifted bytecode path details so much, there is no foolproof way to provide
      backwards-compatibility with SourceLoader. Because of this the class is simply
      deprecated and users should move to SourceLoader (and optionally PyLoader for
      Python 3.1). This does lead to a loss of support for sourceless loading
      unfortunately.
      
      At some point before Python 3.2 is released, SourceLoader will be moved over to
      importlib._bootstrap so that the core code of importlib relies on the new code
      instead of the old PyPycLoader code. This commit is being done now so that
      there is no issue in having the API in Python 3.1a1.
      af8f9ab3
    • Benjamin Peterson's avatar
      Blocked revisions 79596 via svnmerge · 536b046c
      Benjamin Peterson authored
      ........
        r79596 | eric.smith | 2010-04-02 07:30:56 -0500 (Fri, 02 Apr 2010) | 1 line
      
        Issue 7994: Make object.__format__ with a non-empty format string a PendingDecprecationWarning. Still need to remove uses of this from various tests.
      ........
      536b046c