diff options
author | Brett Cannon <bcannon@gmail.com> | 2009-04-01 03:35:20 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2009-04-01 03:35:20 (GMT) |
commit | 12e533d7bfd37737a8cf17150ee219f8e3a91b80 (patch) | |
tree | 9d9458706ac4353dedbde84745563195e14bc5fd | |
parent | a7cff0230b0f9a952798f128831a7722b9a17c4c (diff) | |
download | cpython-12e533d7bfd37737a8cf17150ee219f8e3a91b80.zip cpython-12e533d7bfd37737a8cf17150ee219f8e3a91b80.tar.gz cpython-12e533d7bfd37737a8cf17150ee219f8e3a91b80.tar.bz2 |
Rip out a useless method that the superclass implements properly.
-rw-r--r-- | Lib/importlib/_bootstrap.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index 949a612..ee3f1e6 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -475,25 +475,6 @@ class _PyFileLoader(PyLoader): # Not a property so that it is easy to override. return self._find_path(imp.PY_SOURCE) - @_check_name - def get_source(self, fullname): - """Return the source for the module as a string. - - Return None if the source is not available. Raise ImportError if the - laoder cannot handle the specified module. - - """ - source_path = self._source_path(name) - if source_path is None: - return None - import tokenize - with _closing(_io.FileIO(source_path, 'r')) as file: # Assuming bytes. - encoding, lines = tokenize.detect_encoding(file.readline) - # XXX Will fail when passed to compile() if the encoding is - # anything other than UTF-8. - return open(source_path, encoding=encoding).read() - - def get_data(self, path): """Return the data from path as raw bytes.""" return _io.FileIO(path, 'r').read() # Assuming bytes. |