core: remove vendorized py37 isoformat code

This commit is contained in:
Sean Breckenridge 2022-01-27 09:54:59 -08:00 committed by karlicoss
parent 03dd1271f4
commit 7493770d4d
8 changed files with 7 additions and 146 deletions

View file

@ -3,7 +3,6 @@ Some backwards compatibility stuff/deprecation helpers
'''
from types import ModuleType
from typing import Callable
from datetime import datetime
from . import warnings
from .common import LazyLogger
@ -12,16 +11,6 @@ from .common import LazyLogger
logger = LazyLogger('my.core.compat')
fromisoformat: Callable[[str], datetime]
import sys
if sys.version_info[:2] >= (3, 7):
# prevent mypy on py3.6 from complaining...
fromisoformat_real = datetime.fromisoformat
fromisoformat = fromisoformat_real
else:
from .py37 import fromisoformat
def pre_pip_dal_handler(
name: str,
e: ModuleNotFoundError,