diff --git a/granian/server/common.py b/granian/server/common.py index 2337f964..e2715711 100644 --- a/granian/server/common.py +++ b/granian/server/common.py @@ -457,6 +457,10 @@ def serve( 'Number of workers will now fallback to 1.' ) + if self.interface != Interfaces.WSGI and self.blocking_threads > 1: + logger.error('Blocking threads > 1 is not supported on ASGI and RSGI') + raise ConfigurationError('blocking_threads') + if self.websockets: if self.interface == Interfaces.WSGI: logger.info('Websockets are not supported on WSGI, ignoring') diff --git a/granian/server/mt.py b/granian/server/mt.py index c1aa31c4..0526ac9b 100644 --- a/granian/server/mt.py +++ b/granian/server/mt.py @@ -302,6 +302,8 @@ def serve( target_loader: Optional[Callable[..., Callable[..., Any]]] = None, wrap_loader: bool = True, ): + logger.warning('free-threaded Python support is experimental!') + if self.reload_on_changes: logger.error('The changes reloader is not supported on the free-threaded build') raise ConfigurationError('reload') diff --git a/pyproject.toml b/pyproject.toml index 88f39d34..16bfdfef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,7 +114,7 @@ extend-ignore = [ 'S110', # except pass is fine ] flake8-quotes = { inline-quotes = 'single', multiline-quotes = 'double' } -mccabe = { max-complexity = 15 } +mccabe = { max-complexity = 16 } [tool.ruff.format] quote-style = 'single'