acroz / pylivy

A Python client for Apache Livy, enabling use of remote Apache Spark clusters.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LivyClient not honouring verify=False passed to requests_session

ashokkumarrathore opened this issue · comments

When custom requests.Session is passed to LivySession.create(), it does not honour 'Verify'.
Code sample:

        r_session = requests.Session()
        r_session.verify=False

        livy_session = LivySession.create(
            LIVY_URL,
            requests_session=r_session,
            kind=SessionKind.SQL)

This ignores verify=False set in requests session and will go ahead with default(Verify=true) behaviour.

We can either update it from arg requests_Session from here :

self.verify = verify

or pass appropriate value here :

verify=self.verify,