From 2b0bfdb46e0894eec5d6cae78c56fc91ecb2e101 Mon Sep 17 00:00:00 2001 From: Marti Raudsepp Date: Fri, 29 Apr 2022 08:51:56 +0300 Subject: [PATCH] Restore Python 3.7 compatibility (#945) django-stubs still supports Python 3.7, but the `/` positional-only parameter syntax is supported only in Python 3.8+. Not sure why this error wasn't caught in CI. --- django-stubs/http/request.pyi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/django-stubs/http/request.pyi b/django-stubs/http/request.pyi index 281cff4..9dd4b82 100644 --- a/django-stubs/http/request.pyi +++ b/django-stubs/http/request.pyi @@ -161,9 +161,9 @@ class QueryDict(MultiValueDict[str, str]): def appendlist(self, key: Union[str, bytes], value: Union[str, bytes]) -> None: ... # Fake signature (because *args is used in source, but it fails with more that 1 argument) @overload - def pop(self, key: Union[str, bytes], /) -> str: ... + def pop(self, __key: Union[str, bytes]) -> str: ... @overload - def pop(self, key: Union[str, bytes], default: Union[str, _Z] = ..., /) -> Union[str, _Z]: ... + def pop(self, __key: Union[str, bytes], __default: Union[str, _Z] = ...) -> Union[str, _Z]: ... def popitem(self) -> Tuple[str, str]: ... def clear(self) -> None: ... def setdefault(self, key: Union[str, bytes], default: Union[str, bytes, None] = ...) -> str: ... @@ -182,9 +182,9 @@ class _ImmutableQueryDict(QueryDict): def appendlist(self, key: Union[str, bytes], value: Union[str, bytes]) -> NoReturn: ... # Fake signature (because *args is used in source, but it fails with more that 1 argument) @overload - def pop(self, key: Union[str, bytes], /) -> NoReturn: ... + def pop(self, __key: Union[str, bytes]) -> NoReturn: ... @overload - def pop(self, key: Union[str, bytes], default: Union[str, _Z] = ..., /) -> NoReturn: ... + def pop(self, __key: Union[str, bytes], __default: Union[str, _Z] = ...) -> NoReturn: ... def popitem(self) -> NoReturn: ... def clear(self) -> NoReturn: ... def setdefault(self, key: Union[str, bytes], default: Union[str, bytes, None] = ...) -> NoReturn: ...