1. 10 May, 2016 1 kayıt (commit)
  2. 16 May, 2014 1 kayıt (commit)
  3. 09 May, 2014 1 kayıt (commit)
  4. 27 Şub, 2014 1 kayıt (commit)
  5. 07 Ock, 2014 1 kayıt (commit)
  6. 04 Ock, 2014 1 kayıt (commit)
  7. 06 Ara, 2013 1 kayıt (commit)
  8. 08 Kas, 2013 1 kayıt (commit)
  9. 25 Eki, 2013 1 kayıt (commit)
  10. 16 Haz, 2013 1 kayıt (commit)
  11. 15 Haz, 2013 1 kayıt (commit)
  12. 31 May, 2013 1 kayıt (commit)
    • Brett Cannon's avatar
      Issues #18088, 18089: Introduce · 0dbb4c7f
      Brett Cannon yazdı
      importlib.abc.Loader.init_module_attrs() and implement
      importlib.abc.InspectLoader.load_module().
      
      The importlib.abc.Loader.init_module_attrs() method sets the various
      attributes on the module being loaded. It is done unconditionally to
      support reloading. Typically people used
      importlib.util.module_for_loader, but since that's a decorator there
      was no way to override it's actions, so init_module_attrs() came into
      existence to allow for overriding. This is also why module_for_loader
      is now pending deprecation (having its other use replaced by
      importlib.util.module_to_load).
      
      All of this allowed for importlib.abc.InspectLoader.load_module() to
      be implemented. At this point you can now implement a loader with
      nothing more than get_code() (which only requires get_source();
      package support requires is_package()). Thanks to init_module_attrs()
      the implementation of load_module() is basically a context manager
      containing 2 methods calls, a call to exec(), and a return statement.
      0dbb4c7f
  13. 25 Ara, 2012 1 kayıt (commit)
  14. 31 Tem, 2012 1 kayıt (commit)
  15. 20 Tem, 2012 1 kayıt (commit)
  16. 27 Haz, 2012 1 kayıt (commit)
  17. 11 May, 2012 1 kayıt (commit)
    • Brett Cannon's avatar
      Issue #13959: Have · c049952d
      Brett Cannon yazdı
      importlib.abc.FileLoader.load_module()/get_filename() and
      importlib.machinery.ExtensionFileLoader.load_module() have their
      single argument be optional as the loader's constructor has all the
      ncessary information.
      
      This allows for the deprecation of
      imp.load_source()/load_compile()/load_package().
      c049952d
  18. 25 Nis, 2012 2 kayıt (commit)
  19. 24 Nis, 2012 1 kayıt (commit)
  20. 22 Nis, 2012 1 kayıt (commit)
  21. 14 Nis, 2012 1 kayıt (commit)
    • Brett Cannon's avatar
      Issue #2377: Make importlib the implementation of __import__(). · fd074155
      Brett Cannon yazdı
      importlib._bootstrap is now frozen into Python/importlib.h and stored
      as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen
      code along with sys and imp and then uses _frozen_importlib._install()
      to set builtins.__import__() w/ _frozen_importlib.__import__().
      fd074155
  22. 13 Nis, 2012 1 kayıt (commit)
  23. 25 Ock, 2012 2 kayıt (commit)
  24. 24 Ock, 2012 1 kayıt (commit)
  25. 30 Ara, 2011 1 kayıt (commit)
  26. 13 Ock, 2012 1 kayıt (commit)
  27. 02 Tem, 2011 1 kayıt (commit)
  28. 22 Agu, 2010 1 kayıt (commit)
  29. 03 Tem, 2010 2 kayıt (commit)
    • Brett Cannon's avatar
      Make importlib.abc.SourceLoader the primary mechanism for importlib. · d71bed3d
      Brett Cannon yazdı
      This required moving the class from importlib/abc.py into
      importlib/_bootstrap.py and jiggering some code to work better with the class.
      This included changing how the file finder worked to better meet import
      semantics. This also led to fixing importlib to handle the empty string from
      sys.path as import currently does (and making me wish we didn't support that
      instead just required people to insert '.' instead to represent cwd).
      
      It also required making the new set_data abstractmethod create
      any needed subdirectories implicitly thanks to __pycache__ (it was either this
      or grow the SourceLoader ABC to gain an 'exists' method and either a mkdir
      method or have set_data with no data arg mean to create a directory).
      
      Lastly, as an optimization the file loaders cache the file path where the
      finder found something to use for loading (this is thanks to having a
      sourceless loader separate from the source loader to simplify the code and
      cut out stat calls).
      Unfortunately test_runpy assumed a loader would always work for a module, even
      if you changed from underneath it what it was expected to work with. By simply
      dropping the previous loader in test_runpy so the proper loader can be returned
      by the finder fixed the failure.
      
      At this point importlib deviates from import on two points:
      
      1. The exception raised when trying to import a file is different (import does
      an explicit file check to print a special message, importlib just says the path
      cannot be imported as if it was just some module name).
      
      2. the co_filename on a code object is not being set to where bytecode was
      actually loaded from instead of where the marshalled code object originally
      came from (a solution for this has already been agreed upon on python-dev but has
      not been implemented yet; issue8611).
      d71bed3d
    • Brett Cannon's avatar
      Make importlib.abc.SourceLoader the primary mechanism for importlib. · 61b14251
      Brett Cannon yazdı
      This required moving the class from importlib/abc.py into
      importlib/_bootstrap.py and jiggering some code to work better with the class.
      This included changing how the file finder worked to better meet import
      semantics. This also led to fixing importlib to handle the empty string from
      sys.path as import currently does (and making me wish we didn't support that
      instead just required people to insert '.' instead to represent cwd).
      
      It also required making the new set_data abstractmethod create
      any needed subdirectories implicitly thanks to __pycache__ (it was either this
      or grow the SourceLoader ABC to gain an 'exists' method and either a mkdir
      method or have set_data with no data arg mean to create a directory).
      
      Lastly, as an optimization the file loaders cache the file path where the
      finder found something to use for loading (this is thanks to having a
      sourceless loader separate from the source loader to simplify the code and
      cut out stat calls).
      Unfortunately test_runpy assumed a loader would always work for a module, even
      if you changed from underneath it what it was expected to work with. By simply
      dropping the previous loader in test_runpy so the proper loader can be returned
      by the finder fixed the failure.
      
      At this point importlib deviates from import on two points:
      
      1. The exception raised when trying to import a file is different (import does
      an explicit file check to print a special message, importlib just says the path
      cannot be imported as if it was just some module name).
      
      2. the co_filename on a code object is not being set to where bytecode was
      actually loaded from instead of where the marshalled code object originally
      came from (a solution for this has already been agreed upon on python-dev but has
      not been implemented yet; issue8611).
      61b14251
  30. 18 May, 2010 1 kayıt (commit)
  31. 17 Nis, 2010 1 kayıt (commit)
  32. 19 Şub, 2010 2 kayıt (commit)
  33. 07 Kas, 2009 2 kayıt (commit)
  34. 27 Agu, 2009 1 kayıt (commit)
  35. 13 Agu, 2009 1 kayıt (commit)