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 djc
Recipients djc
Date 2010-06-02.14:09:02
SpamBayes Score 0.06815834
Marked as misclassified No
Message-id <1275487745.39.0.469741822942.issue8877@psf.upfronthosting.co.za>
In-reply-to
Content
djc@enrai src $ ls -l test/*
-rw-r--r-- 1 djc users 34 Jun  2 16:00 test/http.py
-rw-r--r-- 1 djc users  0 Jun  2 16:00 test/__init__.py
djc@enrai src $ cat test/http.py
from httplib import BadStatusLine
djc@enrai src $ 2to3 test/*
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
--- test/http.py (original)
+++ test/http.py (refactored)
@@ -1,1 +1,1 @@
-from httplib import BadStatusLine
+from .http.client import BadStatusLine
RefactoringTool: Files that need to be modified:
RefactoringTool: test/http.py

... which doesn't work, of course. On the other hand, http.py is not in a package, it works correctly. If test/http.py is moved to test/blah.py instead, it also works correctly. 2to3 should be able to conclude that the "httplib" it was before did not refer to .http, but refered to http.client.
History
Date User Action Args
2010-06-02 14:09:05djcsetrecipients: + djc
2010-06-02 14:09:05djcsetmessageid: <1275487745.39.0.469741822942.issue8877@psf.upfronthosting.co.za>
2010-06-02 14:09:03djclinkissue8877 messages
2010-06-02 14:09:02djccreate