django.utils.version.get_version() discrepancy for Python 2 vs. Python 3

96 views
Skip to first unread message

Tim Graham

unread,
Nov 17, 2015, 12:00:25 PM11/17/15
to Django developers (Contributions to Django itself)
There was a small hiccup with the 1.9 release candidate yesterday. Unless there is some other conflating factor that I missed, generating release packages using Python 2 will yield a name like "Django-1.9c1.tar.gz" while Python 3 yields "Django-1.9rc1.tar.gz" ('rc' instead of 'c'). Yesterday's release must have been the first release candidate to be generated using Python 3, and this broke the download page because django.utils.version.get_version() (which the website uses) returns "c1" for the file name instead of "rc1". I put in a (perhaps temporary) fix to correct this: https://github.com/django/djangoproject.com/pull/547

Do you think it's correct to make the change in Django itself? https://github.com/django/django/pull/5676 -- I didn't track down the reason why this changed in Python.
While get_version() isn't a public API, it's widely used according to GitHub search.

Aymeric Augustin

unread,
Nov 17, 2015, 3:03:36 PM11/17/15
to django-d...@googlegroups.com
On 17 nov. 2015, at 18:00, Tim Graham <timog...@gmail.com> wrote:

Do you think it's correct to make the change in Django itself? https://github.com/django/django/pull/5676 -- I didn't track down the reason why this changed in Python.


Per PEP 386, the standard scheme is ‘c’, although ‘rc’ is acceptable as well.

Pre-releases can use a for "alpha", b for "beta" and c for "release candidate". rc is an alternative notation for "release candidate" that is added to make the version scheme compatible with Python's own version scheme. rc sorts after c.

We can take this opportunity to change the naming scheme to what Python 3 generates by default. We just have to be careful not to generate releases with Python 2 from now on. I suggest to add something in the release checklist (assuming you still follow it when making releases, perhaps you know it by heart by now).

-- 
Aymeric.



Donald Stufft

unread,
Nov 17, 2015, 5:05:50 PM11/17/15
to django-d...@googlegroups.com

On Nov 17, 2015, at 3:03 PM, Aymeric Augustin <aymeric....@polytechnique.org> wrote:

On 17 nov. 2015, at 18:00, Tim Graham <timog...@gmail.com> wrote:

Do you think it's correct to make the change in Django itself? https://github.com/django/django/pull/5676 -- I didn't track down the reason why this changed in Python.


Per PEP 386, the standard scheme is ‘c’, although ‘rc’ is acceptable as well.

PEP 386 has been superseded by PEP 440 which recommends “rc” because almost everyone was using “rc” and not “c”. It didn’t seem reasonable to have a decision which was solely bike shedding (it can handle rc as easily as it can handle c) to favor an option that flew in the face of what most projects were doing.

-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA

signature.asc

Donald Stufft

unread,
Nov 17, 2015, 5:06:59 PM11/17/15
to django-d...@googlegroups.com
Whoever generated the tarballs is probably using a version of setuptools older than 8.0 in their Python 2 environment and a version of setuptools newer than 8.0 in their Python 3 environment.
signature.asc

Tim Graham

unread,
Nov 17, 2015, 7:26:51 PM11/17/15
to Django developers (Contributions to Django itself)
Thanks Donald, updating setuptools was the factor I missed, not Python 2 vs. 3.

Aymeric Augustin

unread,
Nov 18, 2015, 4:04:52 AM11/18/15
to django-d...@googlegroups.com
Considering the information provided by Donald, it’s pretty clear to me that we should switch to rc as proposed by Tim.

-- 
Aymeric.



--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/e02a697f-36c4-4604-b484-1907919a6a54%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages