Changes between Initial Version and Version 3 of Ticket #24562
- Timestamp:
- Apr 2, 2015, 11:05:15 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24562
- Property Triage Stage Unreviewed → Accepted
- Property Has patch set
- Property Owner changed from to
- Property Status new → assigned
- Property Severity Release blocker → Normal
- Property Summary Test failure: Pickleability → django.utils.version.get_major_version() does not return the major version
-
Ticket #24562 – Description
initial v3 1 Following the version bump to 1.8.1, we have failures on `test_unsupported_unpickle (queryset_pickle.tests.PickleabilityTestCase)` and `test_unsupported_unpickle (model_regress.test_pickle.ModelPickleTestCase)`. The problem is arguably in the test code: Both tests assume that `django.utils.version.get_major_version()` returns a `x.y` string, but that is only true for .0 minor versions -- and so the tests broke on the version bump to1.8.1.1 `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. 2 2 3 I'm not quite sure about the fix -- `django.utils.version.get_major_version()` looks like a public interface but it is not documented as far as I could see; it hasn't changed in a long time, but its return value is unintuitive, and I would expect the same as the author(s) of these tests. 3 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()`). 4 5 Should we just make it private?