summaryrefslogtreecommitdiff
path: root/django/bin
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-08-11 16:41:25 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-08-12 14:44:40 +0200
commit79d62a71751140315227891bbe175630f9d3edc3 (patch)
tree94d71669f89666dce137420daa61e2f2ecec906e /django/bin
parenta0a0203a392f67832ba7a8a2f099e70d7db2d19e (diff)
[py3] Added fixer for python_2_unicode_compatible.
This doesn't deal with classes that define both __unicode__ and __str__; the definition of __str__ should be removed first. It doesn't guarantee that __str__ will return a str (rather than bytes) under Python 3 either.
Diffstat (limited to 'django/bin')
-rwxr-xr-xdjango/bin/django-2to3.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/django/bin/django-2to3.py b/django/bin/django-2to3.py
new file mode 100755
index 0000000000..35566abb94
--- /dev/null
+++ b/django/bin/django-2to3.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+
+# This works exactly like 2to3, except that it uses Django's fixers rather
+# than 2to3's built-in fixers.
+
+import sys
+from lib2to3.main import main
+
+sys.exit(main("django.utils.2to3_fixes"))
+