[Django] #23442: Module Version Information

9 views
Skip to first unread message

Django

unread,
Sep 6, 2014, 5:32:11 PM9/6/14
to django-...@googlegroups.com
#23442: Module Version Information
--------------------------------------+---------------------
Reporter: abhillman | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Keywords: version
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------------+---------------------
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>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 6, 2014, 6:03:56 PM9/6/14
to django-...@googlegroups.com
#23442: Module Version Information
-------------------------------------+-------------------------------------
Reporter: abhillman | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: master
Component: Uncategorized | Resolution:
Severity: Normal | Triage Stage:
Keywords: version | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* 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>

Django

unread,
Sep 6, 2014, 7:16:57 PM9/6/14
to django-...@googlegroups.com
#23442: Module Version Information
-------------------------------------+-------------------------------------
Reporter: abhillman | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Uncategorized | Resolution:
Severity: Normal | Triage Stage:
Keywords: version | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by timgraham:

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>

Django

unread,
Sep 7, 2014, 4:31:25 AM9/7/14
to django-...@googlegroups.com
#23442: Module Version Information
-------------------------------------+-------------------------------------
Reporter: abhillman | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Uncategorized | Resolution:
Severity: Normal | Triage Stage:
Keywords: version | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Django

unread,
Sep 8, 2014, 12:54:11 PM9/8/14
to django-...@googlegroups.com
#23442: Define django.__version__
-------------------------------------+-------------------------------------
Reporter: abhillman | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Uncategorized | Resolution:
Severity: Normal | Triage Stage:
Keywords: version | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

Any objections to the attached patch?

--
Ticket URL: <https://code.djangoproject.com/ticket/23442#comment:4>

Django

unread,
Sep 8, 2014, 1:45:42 PM9/8/14
to django-...@googlegroups.com
#23442: Define django.__version__
-------------------------------------+-------------------------------------
Reporter: abhillman | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Uncategorized | Resolution:
Severity: Normal | Triage Stage:
Keywords: version | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Django

unread,
Sep 9, 2014, 2:16:48 PM9/9/14
to django-...@googlegroups.com
#23442: Define django.__version__
-------------------------------------+-------------------------------------
Reporter: abhillman | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Core (Other) | Resolution:
Severity: Normal | Triage Stage: Ready for
Keywords: version | checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by claudep):

* 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>

Django

unread,
Sep 9, 2014, 2:27:44 PM9/9/14
to django-...@googlegroups.com
#23442: Define django.__version__
-------------------------------------+-------------------------------------
Reporter: abhillman | Owner: nobody
Type: | Status: closed
Cleanup/optimization | Version: master
Component: Core (Other) | Resolution: fixed

Severity: Normal | Triage Stage: Ready for
Keywords: version | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* 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>

Reply all
Reply to author
Forward
0 new messages