Opened 9 years ago

Last modified 9 years ago

#24562 closed Cleanup/optimization

django.utils.version.get_major_version() does not return the major version — at Version 3

Reported by: Shai Berger Owned by: Tim Graham
Component: Utilities Version: 1.8
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by Shai Berger)

django.utils.version.get_major_version() should returns a x.y string, that is what we call a major version. It does that only for the ".0" versions -- It returns "1.8" for 1.8, and "1.8.1" for 1.8.1.

I'm not quite sure about the fix -- django.utils.version.get_major_version() looks like a public interface but it is not documented. Now that the tests have been fixed, its only use in the Django code base is in the same file (from get_version()).

Should we just make it private?

Change History (3)

comment:1 by Baptiste Mispelon, 9 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Tim Graham, 9 years ago

Has patch: set
Owner: changed from nobody to Tim Graham
Status: newassigned

comment:3 by Shai Berger, 9 years ago

Description: modified (diff)
Severity: Release blockerNormal
Summary: Test failure: Pickleabilitydjango.utils.version.get_major_version() does not return the major version

I see that the PR is already merged, so there are no longer test failures and what's left is not a release blocker.

I updated the summary and description to focus on the issues left.

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