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.

Author madison.may
Recipients Arfrever, brett.cannon, madison.may, ncoghlan, ronaldoussoren
Date 2013-08-08.01:16:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1375924609.56.0.898504712178.issue18416@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2013-08-08 01:16:49madison.maysetrecipients: + madison.may, brett.cannon, ronaldoussoren, ncoghlan, Arfrever
2013-08-08 01:16:49madison.maysetmessageid: <1375924609.56.0.898504712178.issue18416@psf.upfronthosting.co.za>
2013-08-08 01:16:49madison.maylinkissue18416 messages
2013-08-08 01:16:48madison.maycreate