(self, *exc_info)
| 722 | return log |
| 723 | |
| 724 | def __exit__(self, *exc_info): |
| 725 | if not self._entered: |
| 726 | raise RuntimeError("Cannot exit %r without entering first" % self) |
| 727 | with _wm._lock: |
| 728 | if _use_context: |
| 729 | self._module._warnings_context.set(self._saved_context) |
| 730 | else: |
| 731 | self._module.filters = self._filters |
| 732 | self._module._showwarnmsg_impl = self._showwarnmsg_impl |
| 733 | self._module.showwarning = self._showwarning |
| 734 | self._module._filters_mutated_lock_held() |
| 735 | |
| 736 | |
| 737 | class deprecated: |