﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
19204	Python2-style exception syntax is still used in django.utils.unittest (and should be updated)	Jim Garrison	Aymeric Augustin	"Installing the Django 1.5a1 package through pip on python 3.2 shows some SyntaxError warnings, due to using python2-style syntax for catching exceptions:

{{{

/tmp/venv/bin$ ./pip-3.2 install https://www.djangoproject.com/download/1.5a1/tarball/
Downloading/unpacking https://www.djangoproject.com/download/1.5a1/tarball/
  Downloading  (7.7MB): 7.7MB downloaded
  Cannot determine compression type for file /tmp/pip-6_1a4e-unpack/tarball.ksh
  Running setup.py egg_info for package from https://www.djangoproject.com/download/1.5a1/tarball/
    
    warning: no previously-included files matching '__pycache__' found under directory '*'
    warning: no previously-included files matching '*.py[co]' found under directory '*'
Installing collected packages: Django
  Running setup.py install for Django
    changing mode of build/scripts-3.2/django-admin.py from 644 to 755
      File ""/tmp/venv/lib/python3.2/site-packages/django/utils/unittest/loader.py"", line 92
        except Exception, e:
                        ^
    SyntaxError: invalid syntax
    
      File ""/tmp/venv/lib/python3.2/site-packages/django/utils/unittest/case.py"", line 327
        except SkipTest, e:
                       ^
    SyntaxError: invalid syntax
    
      File ""/tmp/venv/lib/python3.2/site-packages/django/utils/unittest/main.py"", line 153
        except getopt.error, msg:
                           ^
    SyntaxError: invalid syntax
    
      File ""/tmp/venv/lib/python3.2/site-packages/django/utils/unittest/suite.py"", line 141
        except Exception, e:
                        ^
    SyntaxError: invalid syntax
    
    
    warning: no previously-included files matching '__pycache__' found under directory '*'
    warning: no previously-included files matching '*.py[co]' found under directory '*'
    changing mode of /tmp/venv/bin/django-admin.py to 755
Successfully installed Django
Cleaning up...
}}}

It's not clear to me why these files were not updated with the new exception syntax, but I've attached a patch that does just that."	Bug	closed	Python 3	1.5-alpha-1	Release blocker	fixed	py3k		Accepted	1	0	0	1	0	0
