You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2024/12/11 21:12:59 UTC

(superset) 01/01: fix: pkg_resources is getting deprecated

This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch rm_pkg_resources
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 9e4325bd741a11650f5b29483d19dd5a58a3636a
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Wed Dec 11 13:11:30 2024 -0800

    fix: pkg_resources is getting deprecated
    
    Saw a warning about pkg_resources getting deprecated, so moving to the
    recommended solution
---
 superset/config.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/superset/config.py b/superset/config.py
index 8a490a982d..9246e0f030 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -39,7 +39,6 @@ from importlib.resources import files
 from typing import Any, Callable, Iterator, Literal, TYPE_CHECKING, TypedDict
 
 import click
-import pkg_resources
 from celery.schedules import crontab
 from flask import Blueprint
 from flask_appbuilder.security.manager import AUTH_DB
@@ -86,7 +85,7 @@ EVENT_LOGGER = DBEventLogger()
 
 SUPERSET_LOG_VIEW = True
 
-BASE_DIR = pkg_resources.resource_filename("superset", "")
+BASE_DIR = str(files("superset"))
 if "SUPERSET_HOME" in os.environ:
     DATA_DIR = os.environ["SUPERSET_HOME"]
 else: