(self, *exc_info)
| 666 | return log |
| 667 | |
| 668 | def __exit__(self, *exc_info): |
| 669 | if not self._entered: |
| 670 | raise RuntimeError("Cannot exit %r without entering first" % self) |
| 671 | with _wm._lock: |
| 672 | if _use_context: |
| 673 | self._module._warnings_context.set(self._saved_context) |
| 674 | else: |
| 675 | self._module.filters = self._filters |
| 676 | self._module.showwarning = self._showwarning |
| 677 | self._module._showwarnmsg_impl = self._showwarnmsg_impl |
| 678 | self._module._filters_mutated_lock_held() |
| 679 | |
| 680 | |
| 681 | class deprecated: |