This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2013年12月14日 13:22 by ncoghlan, last changed 2022年04月11日 14:57 by admin.
| Messages (5) | |||
|---|---|---|---|
| msg206181 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2013年12月14日 13:22 | |
One idea from PEP 451 was to add a "target" parameter to runpy.run_path and runpy.run_module to allow them to support execution in an existing module namespace (like __main__). This missed the feature freeze deadline for 3.4, but can be added in 3.5. |
|||
| msg206430 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2013年12月17日 12:48 | |
Implementing this is actually likely to require non-trivial restructuring of the runpy internals. contextlib.ExitStack may prove useful in making it easier to programmatically select amongst different context managers. The __mp_main__ helpers in multiprocessing should also be able to take advantage of this once it is available, and it may prove useful in finally providing -m analogues for pdb etc that play nice when an exception occurs (see issue 9325). |
|||
| msg305671 - (view) | Author: Sanyam Khurana (CuriousLearner) * (Python triager) | Date: 2017年11月06日 19:45 | |
Hey ncoghlan, Does this issue makes sense to be worked on for Python 3.7? |
|||
| msg305719 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2017年11月07日 07:57 | |
See issue 21862 and issue 9325 as potential use cases for this feature. While it looks like issue 21862 (-m switch support in cProfile) can be implemented just fine without it, this feature will be needed for the modules that execute the given scripts directly in __main__.__dict__ (e.g. pdb). |
|||
| msg349121 - (view) | Author: Joannah Nanjekye (nanjekyejoannah) * (Python committer) | Date: 2019年08月06日 17:38 | |
issue 19978 also needs this. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:55 | admin | set | github: 64181 |
| 2019年08月06日 17:38:32 | nanjekyejoannah | set | messages: + msg349121 |
| 2019年06月20日 18:19:47 | nanjekyejoannah | set | nosy:
+ nanjekyejoannah |
| 2018年06月04日 12:58:12 | ncoghlan | set | versions: + Python 3.8, - Python 3.7 |
| 2017年11月07日 07:57:46 | ncoghlan | set | versions: + Python 3.7, - Python 3.5 |
| 2017年11月07日 07:57:38 | ncoghlan | set | messages: + msg305719 |
| 2017年11月06日 19:45:00 | CuriousLearner | set | nosy:
+ CuriousLearner messages: + msg305671 |
| 2016年02月22日 09:26:51 | piotr.dobrogost | set | nosy:
+ piotr.dobrogost |
| 2013年12月17日 12:48:44 | ncoghlan | set | messages: + msg206430 |
| 2013年12月14日 13:22:30 | ncoghlan | link | issue19978 dependencies |
| 2013年12月14日 13:22:13 | ncoghlan | set | dependencies: + Update runpy for PEP 451 |
| 2013年12月14日 13:22:03 | ncoghlan | create | |