summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjhance <jhance@users.noreply.github.com>2020-09-24 08:58:13 -0700
committerGitHub <noreply@github.com>2020-09-24 16:58:13 +0100
commit71a225c0ea6fc64ea5b105959a6b8205a0420dbd (patch)
tree7803acdd56c465daaecd05256d8b89c08448dd4a
parent2a658d8806de6a8bbbe985295da546b9e2ec8336 (diff)
downloadpaste-git-71a225c0ea6fc64ea5b105959a6b8205a0420dbd.tar.gz
Remove deprecated imports (#59)
The BaseCookie import is cleaned up to use six. Where splittype and splithost are used the returned values are not, so they can go away.
-rw-r--r--paste/fixture.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/paste/fixture.py b/paste/fixture.py
index 9f175fb..aeb1579 100644
--- a/paste/fixture.py
+++ b/paste/fixture.py
@@ -25,14 +25,7 @@ import subprocess
from six.moves import cStringIO as StringIO
from six.moves.urllib.parse import urlencode
from six.moves.urllib import parse as urlparse
-try:
- # Python 3
- from http.cookies import BaseCookie
- from urllib.parse import splittype, splithost
-except ImportError:
- # Python 2
- from Cookie import BaseCookie
- from urllib import splittype, splithost
+from six.moves.http_cookies import BaseCookie
from paste import wsgilib
from paste import lint
@@ -629,8 +622,6 @@ class TestResponse(object):
"You can only follow redirect responses (not %s)"
% self.full_status)
location = self.header('location')
- type, rest = splittype(location)
- host, path = splithost(rest)
# @@: We should test that it's not a remote redirect
return self.test_app.get(location, **kw)