Skip to content

Commit be74586

Browse files
iadi7yafindepi
authored andcommitted
Removed support for redirect_handler
1 parent e049a60 commit be74586

File tree

4 files changed

+1
-68
lines changed

4 files changed

+1
-68
lines changed

presto/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
from typing import Any, Dict, List, Optional, Text, Tuple, Union # NOQA for mypy types
4040

4141
import presto.logging
42-
import presto.redirect
4342
import requests
4443
from presto import constants, exceptions
4544
from presto.transaction import NO_TRANSACTION

presto/dbapi.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import presto.exceptions
3838
import presto.client
3939
import presto.logging
40-
import presto.redirect
4140
from presto.transaction import Transaction, IsolationLevel, NO_TRANSACTION
4241

4342

presto/redirect.py

Lines changed: 0 additions & 49 deletions
This file was deleted.

tests/test_client.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
from presto.auth import KerberosAuthentication
3131
from presto import constants
3232
import presto.exceptions
33-
import presto.redirect
3433

3534

3635
"""
@@ -607,22 +606,6 @@ def __call__(self, *args, **kwargs):
607606
return http_response
608607

609608

610-
def test_gateway_redirect(monkeypatch):
611-
http_resp = PrestoRequest.http.Response()
612-
http_resp.status_code = 200
613-
614-
gateway_response = FakeGatewayResponse(http_resp, redirect_count=3)
615-
monkeypatch.setattr(PrestoRequest.http.Session, "post", gateway_response)
616-
monkeypatch.setattr(
617-
socket, "gethostbyaddr", lambda *args: ("finalhost", ["finalhost"], "1.2.3.4")
618-
)
619-
620-
req = PrestoRequest(host="coordinator", port=8080, user="test", redirect_handler=presto.redirect.GatewayRedirectHandler())
621-
result = req.post("http://host:80/path/")
622-
assert gateway_response.count == 3
623-
assert result.ok
624-
625-
626609
def test_presto_result_response_headers():
627610
"""
628611
Validates that the `PrestoResult.response_headers` property returns the
@@ -689,3 +672,4 @@ def json(self):
689672

690673
# Validate the result is an instance of PrestoResult
691674
assert isinstance(result, PrestoResult)
675+

0 commit comments

Comments
 (0)