Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#18055 closed Cleanup/optimization (invalid)

check early on for python < 2.6 and provide clear message

Reported by: Preston Holmes Owned by: nobody
Component: Core (Other) Version: dev
Severity: Normal Keywords: installation
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


With a number of areas in Django now being changed to remove 2.5 compatibility, it would make sense to check the python version very early on and give a clear message that Django requires Python >= 2.6

I've modeled the patch on how iPython handles it

Attachments (1)

version-check.diff (1.2 KB) - added by Preston Holmes 11 years ago.

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by Preston Holmes

Attachment: version-check.diff added

comment:1 Changed 11 years ago by Preston Holmes

refs #17965

comment:2 Changed 11 years ago by Paul McMillan

Triage Stage: UnreviewedAccepted

comment:3 Changed 11 years ago by Claude Paroz

Not totally convinced by the django/ addition. If it is checked during setup, I think that those who don't use the setup to install might be clever enough to also check the minimal python version.

comment:4 Changed 11 years ago by Jannis Leidel

Resolution: invalid
Status: newclosed
Triage Stage: AcceptedDesign decision needed

I'm -1 on this, we clearly state this in the docs, and we shouldn't raise a ImportError when only someone tries to import the django module (which works fine with < 2.6). There is a reason the package installation metadata can include a trove classifier for each Python version. Anything else is just mind-boggling mean to our users.

comment:5 Changed 11 years ago by Preston Holmes

This only occurred to me when thinking about what kind of error people might get if they somehow manage to install Django on 2.5 given the bits and pieces that may not be compatible.

Yes this is about avoiding foot shooting. I looked in the various packaging docs about how to define a Python version dependency and I really couldn't find much of anything. The classifiers aren't used by PIP (or others?) to actually prevent installation on 2.5. So I looked at how another solid Python library handles this (iPython). My intent was not to be mean, just to avoid anyone needlessly befuddled by an error deeper in Django internals ;-)

While import django works in < 2.6, isn't that asking for trouble? I would think that Django as a whole requires 2.6, even if some of its components work fine with 2.5

I think either way this is an edge case of usage (diminishing numbers of 2.5 users, esp by the time of Django 1.5 release) - So I have no strong opinion about this being accepted or rejected.

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