There is no change to PEP 302. imp.source_from_cache() and
imp.cache_from_source() may return None.
This commit is contained in:
parent
fe4b02b00c
commit
be8d659956
13
pep-3147.txt
13
pep-3147.txt
|
@ -438,16 +438,9 @@ package [17]_:
|
|||
|
||||
Alternative implementations are free to override these functions to
|
||||
return reasonable values based on their own support for this PEP.
|
||||
|
||||
|
||||
PEP 302 loaders
|
||||
---------------
|
||||
|
||||
PEP 302 [18]_ defined loaders have a `.get_filename()` method which
|
||||
points to the `__file__` for a module. As part of this PEP, we will
|
||||
extend this API, to include a new method `.get_paths()` which will
|
||||
return a 2-tuple containing the path to the source file and the path
|
||||
to where the matching `pyc` file is (or would be).
|
||||
These methods are allowed to return `None` when the implementation (or
|
||||
PEP 302 loader [18]_ in effect) for whatever reason cannot calculate
|
||||
the appropriate file name. They should not raise exceptions.
|
||||
|
||||
|
||||
Backports
|
||||
|
|
Loading…
Reference in New Issue