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 2012年07月17日 07:10 by chris.jerdonek, last changed 2022年04月11日 14:57 by admin.
| Messages (8) | |||
|---|---|---|---|
| msg165683 - (view) | Author: Chris Jerdonek (chris.jerdonek) * (Python committer) | Date: 2012年07月17日 07:10 | |
This issue is to refactor the create-package code in test_runpy into a helper module, as suggested in issue 15358. This is a prerequisite to moving the pkgutil.walk_package() tests from test_runpy into test_pkgutil. |
|||
| msg165702 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2012年07月17日 10:50 | |
One trap to watch out for: it's best to call os.path.realpath() on any temporary directories created, since the interpreter tends to do that internally. I'd previously dealt with this in script_helper.temp_dir, but it came up again when I tightened up the runpy.run_module tests to actually check that __file__ ended up with the expected value. |
|||
| msg165911 - (view) | Author: Chris Jerdonek (chris.jerdonek) * (Python committer) | Date: 2012年07月20日 11:19 | |
I'm going to address this issue in parts to make it easier to review and see what is going on. The first patch I'm uploading shortly here: issue 15403. That issue I created to address just the "file creation" part of the code. The approach I'm taking is to keep the file creation code decoupled from the temp directory, sys.path, and import code. My plan is to address the latter in separate patches by creating or modifying existing test support context managers, as necessary. |
|||
| msg166207 - (view) | Author: Chris Jerdonek (chris.jerdonek) * (Python committer) | Date: 2012年07月23日 04:56 | |
I created issue 15415 and uploaded a patch there with this issue in mind. test_runpy contains supporting _make_pkg() and _del_pkg() methods that, among other things, create and delete a temp directory. That logic would be better handled by a temp directory context manager. The patch uploaded to issue 15415 creates such a context manager and also unit-tests it. It also reduces the duplication of temp directory logic between test/script_helper.py and test/support.py. |
|||
| msg166450 - (view) | Author: Chris Jerdonek (chris.jerdonek) * (Python committer) | Date: 2012年07月26日 01:15 | |
Hi Nick, I was wondering if you'd have time to take a look at the patches I've uploaded to issue 15403 and issue 15415 at some point. Once those are addressed, I think we will be in a much better position to address most of this issue. |
|||
| msg193824 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2013年07月28日 12:50 | |
test.support is now a subpackage in both 3.3 and default, but test.support.package_helper still needs to be created (see comments on #15403) |
|||
| msg223521 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014年07月20日 16:47 | |
The chain of dependencies goes from here to #15403, #18576 and back here. How do we break this loop? |
|||
| msg243530 - (view) | Author: Christie (bobcatfish) * | Date: 2015年05月18日 20:14 | |
@BreamoreBoy, it looks like the next step would be to revisit issue15403 and go through the steps outlined by @ncoghlan. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:32 | admin | set | github: 59581 |
| 2019年03月15日 21:57:39 | BreamoreBoy | set | nosy:
- BreamoreBoy |
| 2015年06月28日 06:03:48 | ncoghlan | set | assignee: ncoghlan -> |
| 2015年05月18日 20:14:14 | bobcatfish | set | nosy:
+ bobcatfish messages: + msg243530 |
| 2015年05月12日 06:31:59 | ncoghlan | unlink | issue18576 dependencies |
| 2014年07月20日 16:47:48 | BreamoreBoy | set | versions:
+ Python 3.5, - Python 3.3, Python 3.4 nosy: + BreamoreBoy messages: + msg223521 type: enhancement |
| 2013年12月18日 12:35:01 | ncoghlan | link | issue18576 dependencies |
| 2013年07月28日 12:50:02 | ncoghlan | set | messages:
+ msg193824 versions: + Python 3.4 |
| 2012年11月13日 05:01:27 | eric.snow | set | nosy:
+ eric.snow |
| 2012年07月30日 10:27:46 | ncoghlan | set | dependencies: + Add temp_dir() and change_cwd() to test.support |
| 2012年07月30日 10:27:22 | ncoghlan | set | assignee: ncoghlan |
| 2012年07月26日 01:15:55 | chris.jerdonek | set | messages: + msg166450 |
| 2012年07月23日 04:56:02 | chris.jerdonek | set | messages: + msg166207 |
| 2012年07月20日 11:19:09 | chris.jerdonek | set | dependencies:
+ Refactor package creation support code into a common location messages: + msg165911 title: Refactor the create-package code in test_runpy into a helper module -> Refactor the test_runpy walk_package support code into a common location |
| 2012年07月17日 10:50:04 | ncoghlan | set | messages: + msg165702 |
| 2012年07月17日 07:11:42 | chris.jerdonek | link | issue15358 dependencies |
| 2012年07月17日 07:10:48 | chris.jerdonek | create | |