From 8360f70024330eeeb5c53d29e4a05194f872b511 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 17 Oct 2016 15:15:22 +1300 Subject: First-order conversion to Python3-only - Zap various occurrences of Python2 in docs and scripts - Remove six from netlib, and some other places where obvious project-wide search and replace works. --- netlib/http/response.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'netlib/http/response.py') diff --git a/netlib/http/response.py b/netlib/http/response.py index ec19640d..30bec2df 100644 --- a/netlib/http/response.py +++ b/netlib/http/response.py @@ -1,6 +1,5 @@ from __future__ import absolute_import, print_function, division -import six import time from email.utils import parsedate_tz, formatdate, mktime_tz from netlib import human @@ -27,13 +26,13 @@ class ResponseData(message.MessageData): timestamp_start=None, timestamp_end=None ): - if isinstance(http_version, six.text_type): + if isinstance(http_version, str): http_version = http_version.encode("ascii", "strict") - if isinstance(reason, six.text_type): + if isinstance(reason, str): reason = reason.encode("ascii", "strict") if not isinstance(headers, nheaders.Headers): headers = nheaders.Headers(headers) - if isinstance(content, six.text_type): + if isinstance(content, str): raise ValueError("Content must be bytes, not {}".format(type(content).__name__)) self.http_version = http_version -- cgit v1.2.3