File tree Expand file tree Collapse file tree 5 files changed +9
-6
lines changed
importlib_resources/tests Expand file tree Collapse file tree 5 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1+ """
2+ Backward-compatability shims to support Python 3.9 and earlier.
3+ """
4+
15import os
26
37
48try :
59 from test .support import import_helper # type: ignore
610except ImportError :
7- # Python 3.9 and earlier
11+
812 class import_helper : # type: ignore
913 from test .support import (
1014 modules_setup ,
@@ -17,13 +21,12 @@ class import_helper: # type: ignore
1721try :
1822 from test .support import os_helper # type: ignore
1923except ImportError :
20- # Python 3.9 compat
24+
2125 class os_helper : # type:ignore
2226 from test .support import temp_dir
2327
2428
2529try :
26- # Python 3.10
2730 from test .support .os_helper import unlink
2831except ImportError :
2932 from test .support import unlink as _unlink
Original file line number Diff line number Diff line change 66from .. import abc
77from ..abc import TraversableResources , ResourceReader
88from . import util
9- from ._compat import os_helper
9+ from .compat . py39 import os_helper
1010
1111
1212class SimpleLoader :
Original file line number Diff line number Diff line change 99from . import data01
1010from . import util
1111from . import _path
12- from ._compat import os_helper , import_helper
12+ from .compat . py39 import os_helper , import_helper
1313
1414
1515@contextlib .contextmanager
Original file line number Diff line number Diff line change 88
99from . import data01
1010from ..abc import ResourceReader
11- from ._compat import import_helper , os_helper
11+ from .compat . py39 import import_helper , os_helper
1212from . import zip as zip_
1313
1414
You can’t perform that action at this time.
0 commit comments