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

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


The following commit(s) were added to refs/heads/master by this push:
     new f510f42b96 fix: pkg_resources is getting deprecated (#31411)
f510f42b96 is described below

commit f510f42b964f51d79709d7edc36898ff495116f4
Author: Maxime Beauchemin <[email protected]>
AuthorDate: Thu Dec 12 09:20:52 2024 -0800

    fix: pkg_resources is getting deprecated (#31411)
---
 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:

Reply via email to