U å·€gpã@stddlZddlmZmZddlmZmZddlmZedƒZ edƒZ e e eee e fgee e ffdœdd „Z dS) éN)Ú perf_counterÚsleep)ÚCallableÚTypeVar)Ú ParamSpecÚTÚP)ÚwaitÚstop_after_delayÚreturncs*tttftttfdœ‡‡fdd„ }|S)a·Decorator to automatically retry a function on error. If the function raises, the function is recalled with the same arguments until it returns or the time limit is reached. When the time limit is surpassed, the last exception raised is reraised. :param wait: The time to wait after an error before retrying, in seconds. :param stop_after_delay: The time limit after which retries will cease, in seconds. )Úfuncr cs,t ˆ¡tjtjtdœ‡‡‡fdd„ ƒ}|S)N)ÚargsÚkwargsr csFtƒ}z ˆ||ŽWStk r>tƒ|ˆkr2‚tˆƒYqXqdS)N)rÚ Exceptionr)r rÚ start_time)r r r ©úG/opt/hc_python/lib/python3.8/site-packages/pip/_internal/utils/retry.pyÚ retry_wrappeds z-retry..wrapper..retry_wrapped)Ú functoolsÚwrapsrr rr)r r©r r )r rÚwrappers zretry..wrapper)rrr)r r rrrrÚretry s&r) rÚtimerrÚtypingrrÚpip._vendor.typing_extensionsrrrÚfloatrrrrrÚs þ