From 1db950b78c0a5f32400c7051fedb980e9c7e94fc Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Sat, 2 May 2026 02:58:25 +0100 Subject: [PATCH 1/6] Bump linter to 3.11 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b134204..c6e1532e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.11 cache: 'pip' cache-dependency-path: '**/requirements*.txt' - name: Install dependencies From 1d5303993b7ea8c186812263b445f91d11e87b47 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Sat, 2 May 2026 02:59:13 +0100 Subject: [PATCH 2/6] Fix formatting of exception traceback output --- aiohttp_devtools/logs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiohttp_devtools/logs.py b/aiohttp_devtools/logs.py index 53683d26..3087d528 100644 --- a/aiohttp_devtools/logs.py +++ b/aiohttp_devtools/logs.py @@ -80,7 +80,7 @@ def formatMessage(self, record: logging.LogRecord) -> str: def formatException(self, ei: _Ei) -> str: sio = StringIO() - traceback.print_exception(*ei, file=sio) # type: ignore[misc] + traceback.print_exception(*ei, file=sio) stack = sio.getvalue() sio.close() if self.stream_is_tty and pyg_lexer: From 24dcff555bf750978816f31b8510ab5e9b3b23e0 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Sat, 2 May 2026 03:02:11 +0100 Subject: [PATCH 3/6] Change client SSL context type to bool or SSLContext --- aiohttp_devtools/runserver/watch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiohttp_devtools/runserver/watch.py b/aiohttp_devtools/runserver/watch.py index 938eda85..b63c251f 100644 --- a/aiohttp_devtools/runserver/watch.py +++ b/aiohttp_devtools/runserver/watch.py @@ -62,7 +62,7 @@ def __init__(self, config: Config): self._reloads = 0 self._session: Optional[ClientSession] = None self._runner = None - self._client_ssl_context: Union[None, SSLContext] = None + self._client_ssl_context: Union[bool, SSLContext] = False assert self._config.watch_path super().__init__(self._config.watch_path) From 128235df4f4ab53c99389820fb4ab3300edeb715 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Sat, 2 May 2026 03:06:54 +0100 Subject: [PATCH 4/6] Apply suggestion from @Dreamsorcerer --- aiohttp_devtools/runserver/watch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiohttp_devtools/runserver/watch.py b/aiohttp_devtools/runserver/watch.py index b63c251f..ca009160 100644 --- a/aiohttp_devtools/runserver/watch.py +++ b/aiohttp_devtools/runserver/watch.py @@ -62,7 +62,7 @@ def __init__(self, config: Config): self._reloads = 0 self._session: Optional[ClientSession] = None self._runner = None - self._client_ssl_context: Union[bool, SSLContext] = False + self._client_ssl_context: Union[bool, SSLContext] = True assert self._config.watch_path super().__init__(self._config.watch_path) From 5a71653a3be88b30827bc76c52e1243a87b66f42 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Sat, 2 May 2026 03:10:59 +0100 Subject: [PATCH 5/6] Modify client_ssl_context property to return bool Change client_ssl_context return type to Union[SSLContext, bool] and set default value to True. --- aiohttp_devtools/runserver/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aiohttp_devtools/runserver/config.py b/aiohttp_devtools/runserver/config.py index eed7c392..6e6730ad 100644 --- a/aiohttp_devtools/runserver/config.py +++ b/aiohttp_devtools/runserver/config.py @@ -103,8 +103,8 @@ def static_path_str(self) -> Optional[str]: return str(self.static_path) if self.static_path else None @property - def client_ssl_context(self) -> Union[SSLContext, None]: - client_ssl_context = None + def client_ssl_context(self) -> Union[SSLContext, bool]: + client_ssl_context = True if self.protocol == "https": client_ssl_context = create_default_ssl_context() if self.ssl_rootcert_file_path: From d8de89f64e9c0e11a2dbc39fa85552a8a42f4286 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Sat, 2 May 2026 03:12:47 +0100 Subject: [PATCH 6/6] Fix type hint for client_ssl_context property --- aiohttp_devtools/runserver/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiohttp_devtools/runserver/config.py b/aiohttp_devtools/runserver/config.py index 6e6730ad..cbde5014 100644 --- a/aiohttp_devtools/runserver/config.py +++ b/aiohttp_devtools/runserver/config.py @@ -104,7 +104,7 @@ def static_path_str(self) -> Optional[str]: @property def client_ssl_context(self) -> Union[SSLContext, bool]: - client_ssl_context = True + client_ssl_context: Union[SSLContext, bool] = True if self.protocol == "https": client_ssl_context = create_default_ssl_context() if self.ssl_rootcert_file_path: