annotate urllib3/contrib/emscripten/__init__.py @ 10:ccec96a537b7

planemo upload for repository https://toolrepo.galaxytrakr.org/view/jpayne/bioproject_to_srr_2/556cac4fb538
author jpayne
date Mon, 06 May 2024 00:12:39 -0400
parents 5eb2d5e3bf22
children
rev   line source
jpayne@7 1 from __future__ import annotations
jpayne@7 2
jpayne@7 3 import urllib3.connection
jpayne@7 4
jpayne@7 5 from ...connectionpool import HTTPConnectionPool, HTTPSConnectionPool
jpayne@7 6 from .connection import EmscriptenHTTPConnection, EmscriptenHTTPSConnection
jpayne@7 7
jpayne@7 8
jpayne@7 9 def inject_into_urllib3() -> None:
jpayne@7 10 # override connection classes to use emscripten specific classes
jpayne@7 11 # n.b. mypy complains about the overriding of classes below
jpayne@7 12 # if it isn't ignored
jpayne@7 13 HTTPConnectionPool.ConnectionCls = EmscriptenHTTPConnection
jpayne@7 14 HTTPSConnectionPool.ConnectionCls = EmscriptenHTTPSConnection
jpayne@7 15 urllib3.connection.HTTPConnection = EmscriptenHTTPConnection # type: ignore[misc,assignment]
jpayne@7 16 urllib3.connection.HTTPSConnection = EmscriptenHTTPSConnection # type: ignore[misc,assignment]