MCPcopy
hub / github.com/MagicStack/asyncpg / _parse_tls_version

Function _parse_tls_version

asyncpg/connect_utils.py:254–264  ·  view source on GitHub ↗
(tls_version)

Source from the content-addressed store, hash-verified

252
253
254def _parse_tls_version(tls_version):
255 if tls_version.startswith('SSL'):
256 raise exceptions.ClientConfigurationError(
257 f"Unsupported TLS version: {tls_version}"
258 )
259 try:
260 return ssl_module.TLSVersion[tls_version.replace('.', '_')]
261 except KeyError:
262 raise exceptions.ClientConfigurationError(
263 f"No such TLS version: {tls_version}"
264 )
265
266
267def _dot_postgresql_path(filename) -> typing.Optional[pathlib.Path]:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…