()
| 23 | |
| 24 | @contextlib.contextmanager |
| 25 | def request_session(): |
| 26 | s = requests.session() |
| 27 | try: |
| 28 | s.headers.update(HEADERS) |
| 29 | s.mount("http://", HTTPAdapter(max_retries=RETRIES)) |
| 30 | s.mount("https://", HTTPAdapter(max_retries=RETRIES)) |
| 31 | yield s |
| 32 | finally: |
| 33 | s.close() |
| 34 | |
| 35 | |
| 36 | class Since(Enum): |
no outgoing calls
no test coverage detected