Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#18961 closed Bug (invalid)

django 1.5 and os x snow leopard default python

Reported by: leftmoose Owned by: nobody
Component: Uncategorized Version: dev
Severity: Normal Keywords: osx, snow leopard
Cc: mhaligowski Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

os x using python 2.6.1 (default on snow leopard)

$ django-admin.py startproject testproj && cd testproj

$ ./manage.py validate
TypeError: Error when calling the metaclass bases
    __init__() keywords must be strings

Change History (9)

comment:1 by Karen Tracey, 12 years ago

Resolution: invalid
Status: newclosed

Per https://docs.djangoproject.com/en/dev/intro/install/ minimum Python level for Django 1.5 will be Python 2.6.5. As I recall this was a conscious choice when choosing the strategy for porting to Python 3. I'm not a Mac person, I have no idea how old snow leopard is? But unless a radical change is considered for how we're going to support Python 3, its default 2.6.1 Python is too old for Django 1.5. I assume there is some way to install a newer Python?

comment:2 by jeroen.pulles@…, 12 years ago

Resolution: invalid
Status: closednew

Rephrasing the issue: Django 1.5 doesn't work on Snow Leopard 10.6.8 out of the box. I'm surprised that this issue is closed with an invalid resolution. Snow Leopard is a common platform (for developers), after all; It's not that old (sold 2009-2011).

Adding an extra python on Snow Leopard isn't for novices, I think. Installing a fresh 2.7 from the python.org website will likely give some developers headaches with PATH's and missing modules. If a novice installs Python 3 for the reason that he/she wants to work with the latest Django, he/she will probably be in an even far worse situation (db drivers, apps, and whatnot that doesn't work yet on 3).

I think that a little guidance would be appreciated.

The current TypeError is vague and no indication to the actual problem. Would it be possible to do an explicit version check and error message for older Pythons?

comment:3 by Karen Tracey, 12 years ago

Is there no way to update the installed Python to 2.6.5 rather than adding an "extra Python"?

It's pretty late in the cycle to add a version check, we're past release candidate stage...

comment:4 by mhaligowski, 12 years ago

"System" Python on OS X is provided by Apple itself and as Snow Leopard is no longer maintined, one shouldn't expect that it will be updated any more.

In the other hand, installing python.org 2.7 is a common operation for Python developers and is widely discussed in the web. Moreover, the installer fixes the paths automatically.

comment:5 by mhaligowski, 12 years ago

Cc: mhaligowski added

comment:6 by Liam, 12 years ago

Resolution: invalid
Status: newclosed

I don't think this is a valid defect as Django 1.5 explicitly requires Python 2.6.5+.

Suggest the solution is to upgrade OS X to 10.7 or 10.8 which ship with Python 2.7, or use django 1.4 or upgrade Python.

Snow leopard is two versions behind the latest.

comment:7 by anonymous, 11 years ago

For many people, "upgrade OS X to 10.7 or 10.8" requires buying a new computer. Upgrading Python on 10.6 is a nightmare. That leaves django 1.4 as the only realistic option for people who want to work with Django on the machine they have, instead of spending hundreds of dollars or drowning in the mess that Apple has made of Python environments. Nevertheless, agree that this is not a "bug" because Django 1.5 explicitly requires 2.6.5+

comment:8 by Aymeric Augustin, 11 years ago

It's easy enough to install another Python version with MacPorts or Homebrew. I have five Python versions on my Mac to test Django against them. I'm running Django 1.3 to 1.7 on Python 2.4 to 3.3 on OS X.6 without any issues.

comment:9 by Elena Williams, 11 years ago

Hi anonymous, We've just encountered this bug. You can install python2.7 *over* the default python2.6.1 installation, which seems to be buggy for Django 1.5+.

Python2.6.1 explodes terribly when you try to use run Django 1.5+, just install python version >2.6 for Mac OSX from here: http://www.python.org/getit/

Note: See TracTickets for help on using tickets.
Back to Top