Opened 10 years ago
Closed 10 years ago
#23442 closed Cleanup/optimization (fixed)
Define django.__version__
Reported by: | Aryeh Hillman | Owned by: | nobody |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Normal | Keywords: | version |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
PEP-0396 (http://legacy.python.org/dev/peps/pep-0396/) specifies that module should specify a __version__
string.
For example, django.__version__
could return "1.7.0".
Django specifies version strings on django.VERSION
as a tuple.
Attachments (1)
Change History (8)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Description: | modified (diff) |
---|
comment:3 by , 10 years ago
I have to point out that most Python projects do conform to that scheme instead of Django's.
It doesn't matter much though.
comment:4 by , 10 years ago
Summary: | Module Version Information → Define django.__version__ |
---|
Any objections to the attached patch?
comment:5 by , 10 years ago
But then we should put the django.utils.version.get_version
import at the top of the file again, as it would be triggered by the import anyway. And you should also pass VERSION
to get_version
.
by , 10 years ago
Attachment: | 23442.diff added |
---|
comment:6 by , 10 years ago
Component: | Uncategorized → Core (Other) |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
It's probably fine this way.
comment:7 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
That PEP is deferred.