Message194637
Nick, it was definitely a good thing to mention. I had to learn the "edit, build, test" cycle the hard way my first time. It took me a good 15-20 minutes to figure out why none of my edits seemed to change anything :)
Anyhow, here's how I see the issue. It seems like we have three main options:
In option one, we only modify PathFinder._path_importer_cache().
if path == '':
- path = '.'
+ path = _os.getcwd()
This associates the cwd with FileFinder(cwd) in sys.path_importer_cache
In option two, we only modify FileFinder.__init__().
- self.path = path or '.'
+ if not path or path == '.':
+ path = _os.getcwd()
+ self.path = path
This associates '.' with FileFinder(cwd) in sys.path_importer_cache.
In option three, we modify both PathFinder and FileFinder. In PathFinder._path_importer_cache() we remove the line that reassigns path to '.' if path is the empty string.
- if path == '':
- path = '.'
In FileFinder.__init__(), we set path to _os.getcwd() if path is false.
- self.path = path or '.'
+ self.path = path or _os.getcwd()
This associates the empty string with FileFinder(cwd) in sys.path_importer_cache.
What are your thoughts? Which solution would you all support? |
|
Date |
User |
Action |
Args |
2013-08-08 01:16:49 | madison.may | set | recipients:
+ madison.may, brett.cannon, ronaldoussoren, ncoghlan, Arfrever |
2013-08-08 01:16:49 | madison.may | set | messageid: <1375924609.56.0.898504712178.issue18416@psf.upfronthosting.co.za> |
2013-08-08 01:16:49 | madison.may | link | issue18416 messages |
2013-08-08 01:16:48 | madison.may | create | |
|