mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 04:03:39 +00:00
Use built-in importlib.resources
on Python 3.9+ (#7042)
Use built-in `importlib.resources` module rather than the external `importlib_resources` package on Python 3.9 and newer. The latter is only intended as a backport for old Python versions, and since modern Linux distributions may no longer support such old Python versions, they also no longer provide importlib_resources (this is the case on Gentoo).
This commit is contained in:
parent
764f0d54a4
commit
9ad4d50b5d
|
@ -1831,7 +1831,10 @@ import atexit
|
||||||
import sys, os
|
import sys, os
|
||||||
import contextlib
|
import contextlib
|
||||||
import ctypes
|
import ctypes
|
||||||
import importlib_resources
|
if sys.version_info >= (3, 9):
|
||||||
|
import importlib.resources as importlib_resources
|
||||||
|
else:
|
||||||
|
import importlib_resources
|
||||||
from .z3types import *
|
from .z3types import *
|
||||||
from .z3consts import *
|
from .z3consts import *
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue