python 2 compatibility

Skip to first unread message

Jeremy Audet

Jan 15, 2014, 4:23:53 PM1/15/14
Hi all,

Is django-extensions fully compatible with Python 2? In particular, there are three scripts that I am curious about: [1], [2] and [3]. Are those scripts compatible with Python 2?

I help distribute django-extensions for Arch Linux. As part of this effort, two packages have been created: python-django-extensions [4] and python2-django-extensions [5]. The first package makes django-extensions available to Python 3 programs, and the second makes django-extensions available to Python 2 programs. I'd like it if the python2-django-extensions package didn't depend upon Python 3. However, all three scripts include a shebang that references /usr/bin/python (either directly or via /usr/bin/env). On Arch Linux, /usr/bin/python points to the Python 3 executable, and /usr/bin/python points to the Python 2 executable. Thus, the three scripts call Python 3.

I can include a patch in the python2-django-extensions package that make the scripts call Python 2. However, I will only do this if the three scripts are compatible with Python 2.




Jan 15, 2014, 5:59:58 PM1/15/14
Everything in Django-Extensions should be compatible with both Python2 and Python3 if this is not the case please provide a ticket and/or pull request so we can fix it.

Nothing in Django-Extensions should result in an executable on the path of the operating system. All commands are run via Django's "".

For all three files,, and, you can make a patch to remove the shebang line.
I have removed those in our repository as well so make sure there is no confusion about this.

Reply all
Reply to author
0 new messages