'Sets the exception information of a ``Future.``
Preserves tracebacks on Python 2.
.. versionadded:: 4.0'

def set_exc_info(self, exc_info):

    self._exc_info = exc_info
    self._log_traceback = True
    if (not _GC_CYCLE_FINALIZERS):
        self._tb_logger = _TracebackLogger(exc_info)
    try:
        self._set_done()
    finally:
        if (self._log_traceback and (self._tb_logger is not None)):
            self._tb_logger.activate()
    self._exc_info = exc_info
