how can I look at period of time surrounding a results of a query?

So technically I have a result way that works:

odd_tic = odd['tic']
dt = odd.caldt.iloc[0] # pd.Timestamp(1994,6,1)
start = dt - pd.Timedelta(3, unit='M')
end = dt + pd.Timedelta(3, unit='M')

odd = df.query('(@start < caldt < @end) and ( tic in @odd_tic)')
odd

But python tells me that it doesn't like this way and it will get removed from future versions.

How am I supposed to do what I'm doing now in future versions? This is the doc that I believe has the answer but I'm having hard time finding specifically what I'm looking for.