]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Issue #19700: set __spec__ appropriately in runpy
authorNick Coghlan <ncoghlan@gmail.com>
Sun, 15 Dec 2013 10:33:02 +0000 (20:33 +1000)
committerNick Coghlan <ncoghlan@gmail.com>
Sun, 15 Dec 2013 10:33:02 +0000 (20:33 +1000)
commit720c7e28cb892204debd1b3820e460a9d654f178
treeba0c12cc266baa1c1d1c274134f83d6843d605fd
parent8aa36a3db97cfed3108f32fcb66c9c84e5c4b00d
Issue #19700: set __spec__ appropriately in runpy

Note that __spec__.name is not currently guaranteed to be in
sys.modules when the code is running, only __name__ is.

The "running module is in sys.modules" invariant will be
expanded to also cover __spec__.name in a subsequent patch.
Doc/library/runpy.rst
Lib/runpy.py
Lib/test/script_helper.py
Lib/test/test_cmd_line_script.py
Lib/test/test_runpy.py