For example, django.__version__ could return "1.7.0".
Django specifies version strings on django.VERSION as a tuple.
--
Ticket URL: <https://code.djangoproject.com/ticket/23442>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
That PEP is deferred.
--
Ticket URL: <https://code.djangoproject.com/ticket/23442#comment:1>
Old description:
> 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.
New description:
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.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/23442#comment:2>
Comment (by thedrow):
I have to point out that most Python projects do conform to that scheme
instead of Django's.
It doesn't matter much though.
--
Ticket URL: <https://code.djangoproject.com/ticket/23442#comment:3>
Comment (by timgraham):
Any objections to the attached patch?
--
Ticket URL: <https://code.djangoproject.com/ticket/23442#comment:4>
Comment (by claudep):
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`.
--
Ticket URL: <https://code.djangoproject.com/ticket/23442#comment:5>
* component: Uncategorized => Core (Other)
* stage: Unreviewed => Ready for checkin
Comment:
It's probably fine this way.
--
Ticket URL: <https://code.djangoproject.com/ticket/23442#comment:6>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"d26199cb70ffc60fc1f54b87fd0723f62fe793e0"]:
{{{
#!CommitTicketReference repository=""
revision="d26199cb70ffc60fc1f54b87fd0723f62fe793e0"
Fixed #23442 -- Added django.__version__ per PEP 396.
Thanks abhillman for the suggestion and Claude Paroz for review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23442#comment:7>