From 6404fb407cc6a988e2d1828eb4ebc9ee0f53b8f3 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Wed, 27 Apr 2022 09:24:46 +0200 Subject: [PATCH] Remove Python 2 support from simplejson --- stubs/simplejson/METADATA.toml | 1 - stubs/simplejson/simplejson/__init__.pyi | 4 ++-- stubs/simplejson/simplejson/decoder.pyi | 2 +- stubs/simplejson/simplejson/encoder.pyi | 2 +- stubs/simplejson/simplejson/raw_json.pyi | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/stubs/simplejson/METADATA.toml b/stubs/simplejson/METADATA.toml index e8d5c242ddd3..b4d0bc7dc6a8 100644 --- a/stubs/simplejson/METADATA.toml +++ b/stubs/simplejson/METADATA.toml @@ -1,2 +1 @@ version = "3.17.*" -python2 = true diff --git a/stubs/simplejson/simplejson/__init__.pyi b/stubs/simplejson/simplejson/__init__.pyi index 294df3aadd7e..5cfcc6d4c92a 100644 --- a/stubs/simplejson/simplejson/__init__.pyi +++ b/stubs/simplejson/simplejson/__init__.pyi @@ -1,4 +1,4 @@ -from typing import IO, Any, Text +from typing import IO, Any from typing_extensions import TypeAlias from simplejson.decoder import JSONDecoder as JSONDecoder @@ -6,7 +6,7 @@ from simplejson.encoder import JSONEncoder as JSONEncoder, JSONEncoderForHTML as from simplejson.raw_json import RawJSON as RawJSON from simplejson.scanner import JSONDecodeError as JSONDecodeError -_LoadsString: TypeAlias = Text | bytes | bytearray +_LoadsString: TypeAlias = str | bytes | bytearray def dumps(obj: Any, *args: Any, **kwds: Any) -> str: ... def dump(obj: Any, fp: IO[str], *args: Any, **kwds: Any) -> None: ... diff --git a/stubs/simplejson/simplejson/decoder.pyi b/stubs/simplejson/simplejson/decoder.pyi index 0d726afc5143..72de138fd982 100644 --- a/stubs/simplejson/simplejson/decoder.pyi +++ b/stubs/simplejson/simplejson/decoder.pyi @@ -1,6 +1,6 @@ from typing import Any, Match -class JSONDecoder(object): +class JSONDecoder: def __init__(self, **kwargs: Any) -> None: ... def decode(self, s: str, _w: Match[str], _PY3: bool): ... def raw_decode(self, s: str, idx: int, _w: Match[str], _PY3: bool): ... diff --git a/stubs/simplejson/simplejson/encoder.pyi b/stubs/simplejson/simplejson/encoder.pyi index 9a3c5e4d9aa8..7997976e6263 100644 --- a/stubs/simplejson/simplejson/encoder.pyi +++ b/stubs/simplejson/simplejson/encoder.pyi @@ -1,6 +1,6 @@ from typing import Any -class JSONEncoder(object): +class JSONEncoder: def __init__(self, *args: Any, **kwargs: Any) -> None: ... def encode(self, o: Any): ... def default(self, o: Any): ... diff --git a/stubs/simplejson/simplejson/raw_json.pyi b/stubs/simplejson/simplejson/raw_json.pyi index 25976ea00345..bacd7550aa82 100644 --- a/stubs/simplejson/simplejson/raw_json.pyi +++ b/stubs/simplejson/simplejson/raw_json.pyi @@ -1,3 +1,3 @@ -class RawJSON(object): +class RawJSON: encoded_json: str def __init__(self, encoded_json: str) -> None: ...