core: cleanup deprecations, exclude from type checking and show runtime warnings

among affected things:

- core.common.assert_never
- core.common.cproperty
- core.common.isoparse
- core.common.mcachew
- core.common.the
- core.common.tzdatetime
- core.compat.sqlite_backup
This commit is contained in:
Dima Gerasimov 2024-08-12 16:46:21 +03:00
parent 8834001fe7
commit 918e8ee551
24 changed files with 118 additions and 103 deletions

View file

@ -2,10 +2,10 @@
Timezone data provider, used to localize timezone-unaware timestamps for other modules
'''
from datetime import datetime
from ...core.common import tzdatetime
from my.core.common import datetime_aware
# todo hmm, kwargs isn't mypy friendly.. but specifying types would require duplicating default args. uhoh
def localize(dt: datetime, **kwargs) -> tzdatetime:
def localize(dt: datetime, **kwargs) -> datetime_aware:
# todo document patterns for combining multiple data sources
# e.g. see https://github.com/karlicoss/HPI/issues/89#issuecomment-716495136
from . import via_location as L