Format
Some checks failed
CodeQL / Analyze (python) (pull_request) Failing after 1m34s
Coverage check / Check coverage (pull_request) Failing after 29s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[max-attempts:3 python-version:3.10 tox-env:py310-no-ext]) (pull_request) Failing after 4s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[max-attempts:3 python-version:3.10 tox-env:py310]) (pull_request) Failing after 4s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[max-attempts:3 python-version:3.11 tox-env:py311-no-ext]) (pull_request) Failing after 4s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[max-attempts:3 python-version:3.11 tox-env:py311]) (pull_request) Failing after 4s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[max-attempts:3 python-version:3.8 tox-env:py38-no-ext]) (pull_request) Failing after 5s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[max-attempts:3 python-version:3.8 tox-env:py38]) (pull_request) Failing after 4s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[max-attempts:3 python-version:3.9 tox-env:py39-no-ext]) (pull_request) Failing after 4s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[max-attempts:3 python-version:3.9 tox-env:py39]) (pull_request) Failing after 4s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[python-version:3.10 tox-env:lint]) (pull_request) Failing after 4s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[python-version:3.10 tox-env:security]) (pull_request) Failing after 5s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[python-version:3.10 tox-env:type-checking]) (pull_request) Failing after 4s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[python-version:3.11 tox-env:security]) (pull_request) Failing after 4s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[python-version:3.11 tox-env:type-checking]) (pull_request) Failing after 5s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[python-version:3.8 tox-env:security]) (pull_request) Failing after 4s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[python-version:3.8 tox-env:type-checking]) (pull_request) Failing after 5s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[python-version:3.9 tox-env:security]) (pull_request) Failing after 4s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[python-version:3.9 tox-env:type-checking]) (pull_request) Failing after 5s
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[ignore-errors:true platform:windows-latest python-version:3.10 tox-env:py310-no-ext]) (pull_request) Has been cancelled
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[ignore-errors:true platform:windows-latest python-version:3.11 tox-env:py310-no-ext]) (pull_request) Has been cancelled
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[ignore-errors:true platform:windows-latest python-version:3.8 tox-env:py38-no-ext]) (pull_request) Has been cancelled
Tests / ${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }} (map[ignore-errors:true platform:windows-latest python-version:3.9 tox-env:py39-no-ext]) (pull_request) Has been cancelled

This commit is contained in:
L. Kärkkäinen 2023-10-25 07:34:16 +01:00
parent c8d0c1bf28
commit 00493a6954
2 changed files with 7 additions and 7 deletions

View File

@ -133,7 +133,10 @@ if use_trio: # pragma: no cover
return trio.Path(path).stat() return trio.Path(path).stat()
open_async = trio.open_file open_async = trio.open_file
CancelledErrors: tuple[type[BaseException], ...] = (asyncio.CancelledError, trio.Cancelled) CancelledErrors: tuple[type[BaseException], ...] = (
asyncio.CancelledError,
trio.Cancelled,
)
else: else:
if PYPY_IMPLEMENTATION: if PYPY_IMPLEMENTATION:
pypy_os_module_patch() pypy_os_module_patch()

View File

@ -20,6 +20,7 @@ CIPHERS_TLS12 = [
TlsDef = None | ssl.SSLContext | dict[str, Any] | str TlsDef = None | ssl.SSLContext | dict[str, Any] | str
TlsDefs = TlsDef | list[TlsDef] | tuple[TlsDef, ...] TlsDefs = TlsDef | list[TlsDef] | tuple[TlsDef, ...]
def create_context( def create_context(
certfile: str | None = None, certfile: str | None = None,
keyfile: str | None = None, keyfile: str | None = None,
@ -38,9 +39,7 @@ def create_context(
return context return context
def shorthand_to_ctx( def shorthand_to_ctx(ctxdef: TlsDef) -> ssl.SSLContext | None:
ctxdef: TlsDef
) -> ssl.SSLContext | None:
"""Convert an ssl argument shorthand to an SSLContext object.""" """Convert an ssl argument shorthand to an SSLContext object."""
if ctxdef is None or isinstance(ctxdef, ssl.SSLContext): if ctxdef is None or isinstance(ctxdef, ssl.SSLContext):
return ctxdef return ctxdef
@ -54,9 +53,7 @@ def shorthand_to_ctx(
) )
def process_to_context( def process_to_context(ssldef: TlsDefs) -> ssl.SSLContext | None:
ssldef: TlsDefs
) -> ssl.SSLContext | None:
"""Process app.run ssl argument from easy formats to full SSLContext.""" """Process app.run ssl argument from easy formats to full SSLContext."""
return ( return (
CertSelector(map(shorthand_to_ctx, ssldef)) CertSelector(map(shorthand_to_ctx, ssldef))