How I handled ImmediateDeprecationError in Yahoo Daily finance api

I wanted to retrieve the yahoo finance data. I installed pandas_datareader and I encountered this ImmediateDeprecationError. Here is how I handled the error.
I installed pandas_datareader version 0.5.0 by pip install pandas_datareader==0.5.0

Then I installed pip install fix_yahoo_finance

Here is a sample code then I used for the purpose.

import datetime as dt
import pandas as pd
import as pdr
import fix_yahoo_finance as yf

start = dt.datetime(2018,10,4)
end = dt.datetime(2018,10,4)

##df = pdr.DataReader('TATASTEEL.NS', 'yahoo',  start, end)
df = pdr.DataReader('INFY', 'yahoo',  start, end)