| 144 | self.cookies = http.cookies.SimpleCookie() |
| 145 | |
| 146 | def __del__(self, _warnings=warnings): |
| 147 | if self._closed: |
| 148 | return |
| 149 | if not self._conns: |
| 150 | return |
| 151 | |
| 152 | conns = [repr(c) for c in self._conns.values()] |
| 153 | |
| 154 | self.close() |
| 155 | |
| 156 | _warnings.warn("Unclosed connector {!r}".format(self), |
| 157 | ResourceWarning) |
| 158 | context = {'connector': self, |
| 159 | 'connections': conns, |
| 160 | 'message': 'Unclosed connector'} |
| 161 | if self._source_traceback is not None: |
| 162 | context['source_traceback'] = self._source_traceback |
| 163 | self._loop.call_exception_handler(context) |
| 164 | |
| 165 | @property |
| 166 | def force_close(self): |