Skip to content

Commit fa46774

Browse files
authored
Remove Python 2 support from simplejson (#7704)
1 parent 60f0497 commit fa46774

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

stubs/simplejson/METADATA.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
version = "3.17.*"
2-
python2 = true

stubs/simplejson/simplejson/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
from typing import IO, Any, Text
1+
from typing import IO, Any
22
from typing_extensions import TypeAlias
33

44
from simplejson.decoder import JSONDecoder as JSONDecoder
55
from simplejson.encoder import JSONEncoder as JSONEncoder, JSONEncoderForHTML as JSONEncoderForHTML
66
from simplejson.raw_json import RawJSON as RawJSON
77
from simplejson.scanner import JSONDecodeError as JSONDecodeError
88

9-
_LoadsString: TypeAlias = Text | bytes | bytearray
9+
_LoadsString: TypeAlias = str | bytes | bytearray
1010

1111
def dumps(obj: Any, *args: Any, **kwds: Any) -> str: ...
1212
def dump(obj: Any, fp: IO[str], *args: Any, **kwds: Any) -> None: ...
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Any, Match
22

3-
class JSONDecoder(object):
3+
class JSONDecoder:
44
def __init__(self, **kwargs: Any) -> None: ...
55
def decode(self, s: str, _w: Match[str], _PY3: bool): ...
66
def raw_decode(self, s: str, idx: int, _w: Match[str], _PY3: bool): ...

stubs/simplejson/simplejson/encoder.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Any
22

3-
class JSONEncoder(object):
3+
class JSONEncoder:
44
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
55
def encode(self, o: Any): ...
66
def default(self, o: Any): ...
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
class RawJSON(object):
1+
class RawJSON:
22
encoded_json: str
33
def __init__(self, encoded_json: str) -> None: ...

0 commit comments

Comments
 (0)