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 Tim Graham)

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)

23442.diff (600 bytes ) - added by Tim Graham 10 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by Aymeric Augustin, 10 years ago

That PEP is deferred.

comment:2 by Tim Graham, 10 years ago

Description: modified (diff)

comment:3 by Omer Katz, 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 Tim Graham, 10 years ago

Summary: Module Version InformationDefine django.__version__

Any objections to the attached patch?

comment:5 by Claude Paroz, 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 Tim Graham, 10 years ago

Attachment: 23442.diff added

comment:6 by Claude Paroz, 10 years ago

Component: UncategorizedCore (Other)
Triage Stage: UnreviewedReady for checkin

It's probably fine this way.

comment:7 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: newclosed

In d26199cb70ffc60fc1f54b87fd0723f62fe793e0:

Fixed #23442 -- Added django.version per PEP 396.

Thanks abhillman for the suggestion and Claude Paroz for review.

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