Remove Python 2 support from simplejson (#7704)

This commit is contained in:
Sebastian Rittau
2022-04-27 11:57:29 +02:00
committed by GitHub
parent 60f0497a72
commit fa4677424a
5 changed files with 5 additions and 6 deletions

View File

@@ -1,2 +1 @@
version = "3.17.*"
python2 = true

View File

@@ -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: ...

View File

@@ -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): ...

View File

@@ -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): ...

View File

@@ -1,3 +1,3 @@
class RawJSON(object):
class RawJSON:
encoded_json: str
def __init__(self, encoded_json: str) -> None: ...