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

@ -6,7 +6,6 @@ from typing import TYPE_CHECKING
import zipfile
from ..common import get_files
from ..compat import windows
from ..kompress import CPath, ZipPath
import pytest
@ -56,8 +55,9 @@ def test_single_file() -> None:
'''
assert get_files('/tmp/hpi_test/file.ext') == (Path('/tmp/hpi_test/file.ext'),)
is_windows = os.name == 'nt'
"if the path starts with ~, we expand it"
if not windows: # windows doesn't have bashrc.. ugh
if not is_windows: # windows doesn't have bashrc.. ugh
assert get_files('~/.bashrc') == (Path('~').expanduser() / '.bashrc',)