bgunebakan opened a new issue, #43860:
URL: https://github.com/apache/superset/issues/43860

   ### Bug description
   
   ### Bug description
   
   A clean `pip install apache-superset==6.1.0` on Python 3.11+ produces an 
install that cannot start. Any Superset command that creates the app (`superset 
db upgrade`, `superset run`, ...) fails with:
   
   ```
   TypeError: SupersetMetastoreCache.__init__() got an unexpected keyword 
argument 'ignore_delete_many_errors'
   ```
   
   **Cause:** `flask-caching` 2.5.0 (published 2026-08-24) unconditionally adds 
an `ignore_delete_many_errors` entry to the cache backend options in 
`Cache._set_cache()`:
   
   ```python
   # flask_caching/__init__.py:288-292  (2.5.0)
   cache_options = {
       "default_timeout": config["CACHE_DEFAULT_TIMEOUT"],
       "ignore_delete_many_errors": config["CACHE_IGNORE_ERRORS"],   # new in 
2.5.0
   }
   ...
   cache = cache_factory(app, config, cache_args, cache_options)     # 
non-cachelib backends
   ```
   
   That dict arrives as `kwargs` in `SupersetMetastoreCache.factory()`, which 
splats it into the constructor:
   
   ```python
   # superset/extensions/metastore_cache.py  (6.1.0 and master)
   class SupersetMetastoreCache(BaseCache):
       def __init__(self, namespace: UUID, codec: KeyValueCodec, 
default_timeout: int = 300) -> None:
           ...
   
       @classmethod
       def factory(cls, app, config, args, kwargs) -> BaseCache:
           kwargs["namespace"] = get_uuid_namespace(seed, app)
           kwargs["codec"] = codec
           return cls(*args, **kwargs)      # <-- ignore_delete_many_errors is 
still in kwargs
   ```
   
   `SupersetMetastoreCache` is the default backend for 
`FILTER_STATE_CACHE_CONFIG` and `EXPLORE_FORM_DATA_CACHE_CONFIG`, so this fires 
on a default configuration.
   
   ### How to reproduce
   
   On Python 3.11 or 3.12:
   
   ```bash
   python3.12 -m venv .venv && . .venv/bin/activate
   pip install 'apache-superset==6.1.0'
   pip show flask-caching | grep -i version    # -> 2.5.0
   export SUPERSET_SECRET_KEY=$(openssl rand -base64 42)
   superset db upgrade
   ```
   
   Fails as above. Pinning `pip install 'flask-caching<2.5'` makes it succeed.
   
   Observed in CI here, where the 6.1.0 x py3.11 and 6.1.0 x py3.12 legs fail 
while 6.1.0 x py3.10, 6.0.0 and 4.x all pass:
   
https://github.com/crate/cratedb-examples/actions/workflows/application-apache-superset.yml
   
   ### Expected results
   
   `pip install apache-superset` yields a working installation; `superset db 
upgrade` completes.
   
   ### Actual results
   
   <details><summary>Traceback</summary>
   
   ```
   2026-09-04 03:21:21,210:ERROR:superset.app:Failed to create app
   Traceback (most recent call last):
     File "superset/app.py", line 94, in create_app
       app_initializer.init_app()
     File "superset/initialization/__init__.py", line 754, in init_app
       self.configure_cache()
     File "superset/initialization/__init__.py", line 809, in configure_cache
       cache_manager.init_app(self.superset_app)
     File "superset/utils/cache_manager.py", line 231, in init_app
       self._init_cache(
     File "superset/utils/cache_manager.py", line 225, in _init_cache
       cache.init_app(app, cache_config)
     File "flask_caching/__init__.py", line 280, in init_app
       self._set_cache(app, config)
     File "flask_caching/__init__.py", line 315, in _set_cache
       cache = cache_factory(app, config, cache_args, cache_options)
     File "superset/extensions/metastore_cache.py", line 69, in factory
       return cls(*args, **kwargs)
   TypeError: SupersetMetastoreCache.__init__() got an unexpected keyword 
argument 'ignore_delete_many_errors'
   ```
   
   </details>
   
   Happy to open a PR for either if that's useful.
   
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   6.1.0
   
   ### Python version
   
   3.11
   
   ### Node version
   
   18 or greater
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to