Alberto Donato has proposed merging ~ack/maas-site-manager:importlib-instead-of-pkg-resources into maas-site-manager:main.
Commit message: use importlib.metadata instead of deprecated pkg_resources Requested reviews: MAAS Committers (maas-committers) For more details, see: https://code.launchpad.net/~ack/maas-site-manager/+git/site-manager/+merge/442213 -- Your team MAAS Committers is requested to review the proposed merge of ~ack/maas-site-manager:importlib-instead-of-pkg-resources into maas-site-manager:main.
diff --git a/backend/msm/__init__.py b/backend/msm/__init__.py index 1667eae..029f267 100644 --- a/backend/msm/__init__.py +++ b/backend/msm/__init__.py @@ -1,4 +1,4 @@ -from pkg_resources import get_distribution +from importlib.metadata import distribution __all__ = [ "PACKAGE", @@ -6,6 +6,6 @@ __all__ = [ ] -PACKAGE = get_distribution("msm") +PACKAGE = distribution("msm") __version__ = PACKAGE.version diff --git a/backend/msm/user_api/_setup.py b/backend/msm/user_api/_setup.py index c7bb279..e058f20 100644 --- a/backend/msm/user_api/_setup.py +++ b/backend/msm/user_api/_setup.py @@ -24,7 +24,7 @@ def create_app(db_dsn: str | None = None) -> FastAPI: db = Database(db_dsn) app = FastAPI( title="MAAS Site Manager", - name=PACKAGE.project_name, + name=PACKAGE.name, version=PACKAGE.version, lifespan=lifespan, )
-- Mailing list: https://launchpad.net/~sts-sponsors Post to : sts-sponsors@lists.launchpad.net Unsubscribe : https://launchpad.net/~sts-sponsors More help : https://help.launchpad.net/ListHelp