From 5a13d9976606ac6158f77f6add30e1c610ea1785 Mon Sep 17 00:00:00 2001 From: AlexWaygood Date: Wed, 1 Feb 2023 10:39:33 +0000 Subject: [PATCH 1/5] Bump various test dependencies --- .pre-commit-config.yaml | 4 ++-- pyproject.toml | 2 +- requirements-tests.txt | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c8eec4588fd6..416e3054b9f7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: - id: pycln args: [--config=pyproject.toml, stubs, stdlib, tests, scripts] - repo: https://github.com/psf/black - rev: 22.12.0 # must match requirements-tests.txt + rev: 23.1.0 # must match requirements-tests.txt hooks: - id: black language_version: python3.10 @@ -30,7 +30,7 @@ repos: hooks: - id: flake8 additional_dependencies: - - "flake8-bugbear==23.1.14" # must match requirements-tests.txt + - "flake8-bugbear==23.1.31" # must match requirements-tests.txt - "flake8-noqa==1.3.0" # must match requirements-tests.txt - "flake8-pyi==23.1.2" # must match requirements-tests.txt - repo: https://github.com/pre-commit/mirrors-prettier diff --git a/pyproject.toml b/pyproject.toml index 497a7a905a93..6a013034f1a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,4 +62,4 @@ all = true disable_all_dunder_policy = true [tool.typeshed] -pyright_version = "1.1.285" +pyright_version = "1.1.292" diff --git a/requirements-tests.txt b/requirements-tests.txt index fca2e513eea0..8feed0fe0630 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -1,7 +1,7 @@ aiohttp==3.8.3 -black==22.12.0 # must match .pre-commit-config.yaml +black==23.1.0 # must match .pre-commit-config.yaml flake8==6.0.0; python_version >= "3.8" # must match .pre-commit-config.yaml -flake8-bugbear==23.1.14; python_version >= "3.8" # must match .pre-commit-config.yaml +flake8-bugbear==23.1.20; python_version >= "3.8" # must match .pre-commit-config.yaml flake8-noqa==1.3.0; python_version >= "3.8" # must match .pre-commit-config.yaml flake8-pyi==23.1.2; python_version >= "3.8" # must match .pre-commit-config.yaml isort==5.12.0; python_version >= "3.8" # must match .pre-commit-config.yaml @@ -10,7 +10,7 @@ packaging==23.0 pathspec>=0.10.3 pre-commit-hooks==4.4.0 # must match .pre-commit-config.yaml pycln==2.1.3 # must match .pre-commit-config.yaml -pytype==2023.1.17; platform_system != "Windows" and python_version < "3.11" +pytype==2023.1.31; platform_system != "Windows" and python_version < "3.11" pyyaml==6.0 termcolor>=2 tomli==2.0.1 From 4724060f9e42ad87f039db6f02732ddae442cf09 Mon Sep 17 00:00:00 2001 From: AlexWaygood Date: Wed, 1 Feb 2023 10:43:35 +0000 Subject: [PATCH 2/5] Fix --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 416e3054b9f7..e8ffa8c07bc7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,7 @@ repos: hooks: - id: flake8 additional_dependencies: - - "flake8-bugbear==23.1.31" # must match requirements-tests.txt + - "flake8-bugbear==23.1.20" # must match requirements-tests.txt - "flake8-noqa==1.3.0" # must match requirements-tests.txt - "flake8-pyi==23.1.2" # must match requirements-tests.txt - repo: https://github.com/pre-commit/mirrors-prettier From 72a03b13467733800bd0a288f620fac05806b21f Mon Sep 17 00:00:00 2001 From: AlexWaygood Date: Wed, 1 Feb 2023 10:50:14 +0000 Subject: [PATCH 3/5] Don't upgrade black right now --- .pre-commit-config.yaml | 2 +- requirements-tests.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e8ffa8c07bc7..66637100e994 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: - id: pycln args: [--config=pyproject.toml, stubs, stdlib, tests, scripts] - repo: https://github.com/psf/black - rev: 23.1.0 # must match requirements-tests.txt + rev: 22.12.0 # must match requirements-tests.txt hooks: - id: black language_version: python3.10 diff --git a/requirements-tests.txt b/requirements-tests.txt index 8feed0fe0630..f2f4fa6fef9a 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -1,5 +1,5 @@ aiohttp==3.8.3 -black==23.1.0 # must match .pre-commit-config.yaml +black==22.12.0 # must match .pre-commit-config.yaml flake8==6.0.0; python_version >= "3.8" # must match .pre-commit-config.yaml flake8-bugbear==23.1.20; python_version >= "3.8" # must match .pre-commit-config.yaml flake8-noqa==1.3.0; python_version >= "3.8" # must match .pre-commit-config.yaml From d034d09e9cf6cb72016eb34063ccd918f6af446a Mon Sep 17 00:00:00 2001 From: AlexWaygood Date: Wed, 1 Feb 2023 11:02:25 +0000 Subject: [PATCH 4/5] Try to fix pyright --- stdlib/builtins.pyi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index e635a6e576a8..211db5d6e811 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -1852,6 +1852,7 @@ class BaseException: __context__: BaseException | None __suppress_context__: bool __traceback__: TracebackType | None + def __new__(cls: type[Self], *args: object) -> Self: ... def __init__(self, *args: object) -> None: ... def __setstate__(self, __state: dict[str, Any] | None) -> None: ... def with_traceback(self: Self, __tb: TracebackType | None) -> Self: ... @@ -2008,6 +2009,7 @@ if sys.version_info >= (3, 11): # See `check_exception_group.py` for use-cases and comments. class BaseExceptionGroup(BaseException, Generic[_BaseExceptionT_co]): def __new__(cls: type[Self], __message: str, __exceptions: Sequence[_BaseExceptionT_co]) -> Self: ... + def __init__(self, __message: str, __exceptions: Sequence[_BaseExceptionT_co]) -> None: ... @property def message(self) -> str: ... @property @@ -2045,6 +2047,7 @@ if sys.version_info >= (3, 11): class ExceptionGroup(BaseExceptionGroup[_ExceptionT_co], Exception): def __new__(cls: type[Self], __message: str, __exceptions: Sequence[_ExceptionT_co]) -> Self: ... + def __init__(self, __message: str, __exceptions: Sequence[_ExceptionT_co]) -> None: ... @property def exceptions(self) -> tuple[_ExceptionT_co | ExceptionGroup[_ExceptionT_co], ...]: ... # We accept a narrower type, but that's OK. From 7e55eaa10a9555662224004a0240978beaf9f61f Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Wed, 1 Feb 2023 11:04:49 +0000 Subject: [PATCH 5/5] don't do that --- stdlib/builtins.pyi | 1 - 1 file changed, 1 deletion(-) diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index 211db5d6e811..a0233ffb208c 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -1852,7 +1852,6 @@ class BaseException: __context__: BaseException | None __suppress_context__: bool __traceback__: TracebackType | None - def __new__(cls: type[Self], *args: object) -> Self: ... def __init__(self, *args: object) -> None: ... def __setstate__(self, __state: dict[str, Any] | None) -> None: ... def with_traceback(self: Self, __tb: TracebackType | None) -> Self: ...