From d4caccde26be672e5c3269d8e763c9b8c94abe22 Mon Sep 17 00:00:00 2001 From: Andrew Rabert Date: Thu, 8 Jun 2017 10:14:32 -0400 Subject: [PATCH] Use ietfparse.headers.parse_accept Starting with ietfparse 1.3.0, parse_http_accept_header was marked as deprecated. --- requires/installation.txt | 2 +- sprockets/mixins/mediatype/content.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requires/installation.txt b/requires/installation.txt index 60d5fca..795de93 100644 --- a/requires/installation.txt +++ b/requires/installation.txt @@ -1,2 +1,2 @@ -ietfparse>=1.2.2,<2 +ietfparse>=1.4,<2 tornado>=3.2,<5 diff --git a/sprockets/mixins/mediatype/content.py b/sprockets/mixins/mediatype/content.py index 4a06b6e..0b5ec9d 100644 --- a/sprockets/mixins/mediatype/content.py +++ b/sprockets/mixins/mediatype/content.py @@ -309,7 +309,7 @@ class ContentMixin(object): """Figure out what content type will be used in the response.""" if self._best_response_match is None: settings = get_settings(self.application, force_instance=True) - acceptable = headers.parse_http_accept_header( + acceptable = headers.parse_accept( self.request.headers.get( 'Accept', settings.default_content_type