Philipp Hörist pushed to branch master at gajim / gajim
Commits: 5e8ef4a3 by André Apitzsch at 2021-07-18T11:38:16+00:00 Replace discouraged pkg_resources for Python 3.9+ See https://setuptools.readthedocs.io/en/latest/pkg_resources.html - - - - - 2 changed files: - gajim/common/configpaths.py - setup.cfg Changes: ===================================== gajim/common/configpaths.py ===================================== @@ -118,8 +118,12 @@ def __init__(self) -> None: self.cache_root = Path(GLib.get_user_cache_dir()) / 'gajim' self.data_root = Path(GLib.get_user_data_dir()) / 'gajim' - import pkg_resources - basedir = Path(pkg_resources.resource_filename("gajim", ".")) + if sys.version_info < (3, 9): + import pkg_resources + basedir = Path(pkg_resources.resource_filename("gajim", ".")) + else: + import importlib.resources + basedir = importlib.resources.files('gajim') source_paths = [ ('DATA', basedir / 'data'), ===================================== setup.cfg ===================================== @@ -24,7 +24,7 @@ install_requires = keyring nbxmpp>=2.0.1 packaging - setuptools + setuptools; python_version < '3.9' precis-i18n>=1.0.0 pyOpenSSL>=16.2 pycairo>=1.16.0 View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/5e8ef4a38d836936d1f9aa1936becff289b18a12 -- View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/5e8ef4a38d836936d1f9aa1936becff289b18a12 You're receiving this email because of your account on dev.gajim.org.
_______________________________________________ Commits mailing list [email protected] https://lists.gajim.org/cgi-bin/listinfo/commits
