Message344897
@staticmethod
def _switch_path(path):
from contextlib import suppress
import zipfile
from pathlib import Path
with suppress(Exception):
return zipfile.Path(path)
return Path(path)
Oh, I did not know about zipfile.Path!
I do not think this is a correct solution. It does not work with general loaders. I think that it would be more correct to override some methods in zipimport. |
|
Date |
User |
Action |
Args |
2019-06-07 04:56:56 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, barry, brett.cannon, doko, jaraco, ncoghlan, eric.snow, Anthony Sottile |
2019-06-07 04:56:56 | serhiy.storchaka | set | messageid: <1559883416.59.0.317764287446.issue37162@roundup.psfhosted.org> |
2019-06-07 04:56:56 | serhiy.storchaka | link | issue37162 messages |
2019-06-07 04:56:56 | serhiy.storchaka | create | |
|