Closed Bug 1324707 Opened 8 years ago Closed 8 years ago

Update django-rest-framework since 3.3.x isn't compatible with Django 1.10

Categories

(Tree Management :: Treeherder, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(2 files)

We need to update django-rest-framework, since v3.3.x isn't compatible with Django 1.10. http://www.django-rest-framework.org/topics/3.4-announcement/ http://www.django-rest-framework.org/topics/3.5-announcement/ http://www.django-rest-framework.org/topics/release-notes/#35x-series Currently a simple update to 3.5.3 results in: AssertionError: (u"Creating a ModelSerializer without either the 'fields' attribute or the 'exclude' attribute has been deprecated since 3.3.0, and is now disallowed. Add an explicit fields = '__all__' to the RepositorySerializer serializer.",)
After fixing that I get failures in tests/webapp/api/test_performance_alerts_api.py: def update(self, instance, validated_data): > if instance.summary.repository != validated_data['summary'].repository: E KeyError: 'summary' treeherder/webapp/api/performance_serializers.py:75: KeyError djangorestframework 3.3.3 passes, 3.4.0 fails. Changelog: http://www.django-rest-framework.org/topics/release-notes/#340 https://github.com/tomchristie/django-rest-framework/compare/3.3.3...3.4.0
Nothing leapt out via code inspection of the performance serializer/related test nor from reading d-r-f's docs/changelog/issues tracker, so had to resorting bisecting django-rest-framework master, which found the cause to be: https://github.com/tomchristie/django-rest-framework/commit/c3b7fba918910553661095fed5d31e947a0fe2d6 Investigating further.
Depends on: 1326045
Attachment #8822432 - Flags: review?(wlachance)
Attachment #8822432 - Flags: review?(wlachance) → review+
Commits pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/6d3e9279ceb5f64eba2e63da51bdd816ea06e897 Bug 1324707 - Add an explicit `fields` option to all ModelSerializers Since in django-rest-framework 3.5.0+ each `ModelSerializer` must include either a `fields` option or an `exclude` option: http://www.django-rest-framework.org/topics/3.4-announcement/#use-fields-or-exclude-on-serializer-classes https://github.com/mozilla/treeherder/commit/d905fbfa53bc374b3fd73153130b990e5216f778 Bug 1324707 - Update djangorestframework from 3.3.3 to 3.5.3 http://www.django-rest-framework.org/topics/3.4-announcement/ http://www.django-rest-framework.org/topics/3.5-announcement/ http://www.django-rest-framework.org/topics/release-notes/#35x-series https://github.com/tomchristie/django-rest-framework/compare/3.3.3...3.5.3 https://github.com/mozilla/treeherder/commit/5bf2ad58dc4e125929d39cd3f4bafcb1d0fdb845 Bug 1324707 - Update django-rest-swagger from 0.3.10 to 2.1.0 http://marcgibbons.github.io/django-rest-swagger/#changes-in-20 https://github.com/marcgibbons/django-rest-swagger/blob/master/CHANGELOG.md https://github.com/marcgibbons/django-rest-swagger/compare/0.3.10...2.1.0 Uses the new URLs setup described at: http://marcgibbons.github.io/django-rest-swagger/#quick-start And the new format settings dict: http://marcgibbons.github.io/django-rest-swagger/settings/ https://github.com/mozilla/treeherder/commit/12aa257da4b9cb6a33b22aef86bb4933008094c7 Bug 1324707 - Update djangorestframework-filters from 0.9.0 to 0.9.1 https://github.com/philipn/django-rest-framework-filters/blob/master/CHANGELOG.rst#v091 https://github.com/philipn/django-rest-framework-filters/compare/v0.9.0...v0.9.1
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/58a06d3da7a430a69a3ba73d38aa36ca87c002b9 Bug 1324707 - Re-add PyYAML dependency to requirements/common.txt Since it's required by Django and also by our ETL layer and not just by legacy versions of django-rest-swagger, contrary to the previous comment in common.txt.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: