#3747 closed (fixed)
Changeset [4724] MySQLdb versioncheck not working.
Reported by: | derelm | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
# django/db/backends/mysql/base.py import MySQLdb as Database #[...] if Database.version_info < (1,2,1,'final',2): raise ImportError, "MySQLdb-1.2.1p2 or newer is required; you have %s" % MySQLdb.__version__
Debian Sarge comes with MySQLdb 1.2.1.g2 but the check effectively doesn't kick in.
>>> (1,2,1,'gamma',2) < (1,2,1,'final',2) False
Also MySQLdb has been imported as Database so the Error raised needs to be
raise ImportError, "MySQLdb-1.2.1p2 or newer is required; you have %s" % Database.__version__
Change History (9)
comment:1 Changed 15 years ago by
Summary: | Changeset [4724] MySQLdb versioncheck not working → Changeset [4724] MySQLdb versioncheck not working. |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 Changed 15 years ago by
I've looked around sourceforge for MySQLdb, but can't see any obvious way of finding the differences between 1.2.1 gamma and 1.2.1 final. I doubt, however, that there's any massive changes between a gamma release and a final release.
comment:3 Changed 15 years ago by
With gamma i could not specify DATABASE_OPTIONS = dict(charset="utf8") - that would raise an error. (suggested to fix my problems in #2635). So there seem to be enough differences to cause problems with Django.
comment:4 Changed 15 years ago by
The problem that original forced us to recommend the upgrade to 1.2.1p2 or later (#3279) was only fixed in that precise version. So no earlier versions are recommended for production (and hence any) use with Django. I'm about to check in a version check that knows the difference between "gamma" and "final, 1" and "final, 2".
comment:5 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 Changed 15 years ago by
FWIW, this change broke my sites that are hosted on Dreamhost, as they have MySQL 1.2.1g3. Not suggesting it should be undone, just noting it, as I suspect there will be a lot of people wondering what happened.
comment:7 Changed 15 years ago by
Sorry, I didn't mean to post that as anonymous. That was from me, Jeff Croft.
comment:8 Changed 15 years ago by
Jeff: that's the problem (not Dreamhost in particular, but the breakage in general) and why we had a bit of a discussion about this on django-dev. We're going to somewhat damned whichever way we go, unfortunately. :-(
comment:9 Changed 15 years ago by
Fair enough. Sorry I missed the discussion on django-dev. No big problem for me, just had to rollback that one file on Dreamhost. :)
Design Decision needed re: version support (we should prob. support a well-established os like sarge, but what are the differences between MySQLdb gamma and final)?
The import error is ready to be checked in.