diff --git a/pandas/_libs/tslibs/timestamps.pyi b/pandas/_libs/tslibs/timestamps.pyi index ff6b18835322e..a89d0aecfc26c 100644 --- a/pandas/_libs/tslibs/timestamps.pyi +++ b/pandas/_libs/tslibs/timestamps.pyi @@ -5,7 +5,6 @@ from datetime import ( timedelta, tzinfo as _tzinfo, ) -import sys from time import struct_time from typing import ( ClassVar, @@ -89,16 +88,8 @@ class Timestamp(datetime): def today(cls: Type[_S]) -> _S: ... @classmethod def fromordinal(cls: Type[_S], n: int) -> _S: ... - if sys.version_info >= (3, 8): - @classmethod - def now(cls: Type[_S], tz: _tzinfo | str | None = ...) -> _S: ... - else: - @overload - @classmethod - def now(cls: Type[_S], tz: None = ...) -> _S: ... - @overload - @classmethod - def now(cls, tz: _tzinfo) -> datetime: ... + @classmethod + def now(cls: Type[_S], tz: _tzinfo | str | None = ...) -> _S: ... @classmethod def utcnow(cls: Type[_S]) -> _S: ... @classmethod @@ -129,10 +120,7 @@ class Timestamp(datetime): *, fold: int = ..., ) -> datetime: ... - if sys.version_info >= (3, 8): - def astimezone(self: _S, tz: _tzinfo | None = ...) -> _S: ... - else: - def astimezone(self, tz: _tzinfo | None = ...) -> datetime: ... + def astimezone(self: _S, tz: _tzinfo | None = ...) -> _S: ... def ctime(self) -> str: ... def isoformat(self, sep: str = ..., timespec: str = ...) -> str: ... @classmethod @@ -144,12 +132,8 @@ class Timestamp(datetime): def __lt__(self, other: datetime) -> bool: ... # type: ignore def __ge__(self, other: datetime) -> bool: ... # type: ignore def __gt__(self, other: datetime) -> bool: ... # type: ignore - if sys.version_info >= (3, 8): - def __add__(self: _S, other: timedelta) -> _S: ... - def __radd__(self: _S, other: timedelta) -> _S: ... - else: - def __add__(self, other: timedelta) -> datetime: ... - def __radd__(self, other: timedelta) -> datetime: ... + def __add__(self: _S, other: timedelta) -> _S: ... + def __radd__(self: _S, other: timedelta) -> _S: ... @overload # type: ignore def __sub__(self, other: datetime) -> timedelta: ... @overload diff --git a/pandas/tests/io/json/test_json_table_schema.py b/pandas/tests/io/json/test_json_table_schema.py index 71f1d03ea6d1f..89b8783462f7e 100644 --- a/pandas/tests/io/json/test_json_table_schema.py +++ b/pandas/tests/io/json/test_json_table_schema.py @@ -1,7 +1,6 @@ """Tests for Table Schema integration.""" from collections import OrderedDict import json -import sys import numpy as np import pytest @@ -691,7 +690,6 @@ class TestTableOrientReader: }, ], ) - @pytest.mark.skipif(sys.version_info[:3] == (3, 7, 0), reason="GH-35309") def test_read_json_table_orient(self, index_nm, vals, recwarn): df = DataFrame(vals, index=pd.Index(range(4), name=index_nm)) out = df.to_json(orient="table") @@ -741,7 +739,6 @@ def test_read_json_table_orient_raises(self, index_nm, vals, recwarn): }, ], ) - @pytest.mark.skipif(sys.version_info[:3] == (3, 7, 0), reason="GH-35309") def test_read_json_table_timezones_orient(self, idx, vals, recwarn): # GH 35973 df = DataFrame(vals, index=idx)