[Python-checkins] r56677 - in sandbox/trunk/2to3: README fixes/fix_imports.py
collin.winter
python-checkins at python.org
Thu Aug 2 22:13:40 CEST 2007
Author: collin.winter
Date: Thu Aug 2 22:13:40 2007
New Revision: 56677
Modified:
sandbox/trunk/2to3/ (props changed)
sandbox/trunk/2to3/README
sandbox/trunk/2to3/fixes/fix_imports.py
Log:
Docs fixes.
Modified: sandbox/trunk/2to3/README
==============================================================================
--- sandbox/trunk/2to3/README (original)
+++ sandbox/trunk/2to3/README Thu Aug 2 22:13:40 2007
@@ -49,6 +49,8 @@
* **fix_has_key** - "d.has_key(x)" -> "x in d".
+* **fix_imports** - Fix incompatible imports.
+
* **fix_input** - "input()" -> "eval(input())" (PEP 3111).
* **fix_intern** - "intern(x)" -> "sys.intern(x)".
@@ -73,8 +75,6 @@
* **fix_repr** - swap backticks for repr() calls.
-* **fix_stringio** - StringIO.StringIO -> io.StringIO (imports, too).
-
* **fix_throw** - fix generator.throw() calls to be 3.0-compliant (PEP 3109).
* **fix_tuple_params** - remove tuple parameters from function, method and
Modified: sandbox/trunk/2to3/fixes/fix_imports.py
==============================================================================
--- sandbox/trunk/2to3/fixes/fix_imports.py (original)
+++ sandbox/trunk/2to3/fixes/fix_imports.py Thu Aug 2 22:13:40 2007
@@ -1,13 +1,9 @@
-"""StringIO.StringIO -> io.StringIO (imports, too).
+"""Fix incompatible imports and module references.
-Imports this fixer picks up on:
-* "import StringIO" -> "import io"
-* "from StringIO import StringIO" -> "from io import StringIO"
-* "import StringIO as foo" -> "import io as foo"
-
-If the fixer finds "import StringIO", all "StringIO.StringIO" attribute
-lookups will be translated to "io.StringIO" and all "StringIO" names
-will be translated to "io".
+Fixes:
+ * StringIO -> io
+ * cStringIO -> io
+ * md5 -> hashlib
"""
# Author: Collin Winter
More information about the Python-checkins
mailing list