Opened 10 years ago
Last modified 10 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 )
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 , 10 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 10 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:3 by , 10 years ago
Description: | modified (diff) |
---|---|
Severity: | Release blocker → Normal |
Summary: | Test failure: Pickleability → django.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.
PR