miracle2k / flask-assets

Flask webassets integration.
BSD 2-Clause "Simplified" License
455 stars 99 forks source link

flask-assets will break in flask-2.3 #156

Closed patrickkidd closed 1 year ago

patrickkidd commented 1 year ago

Looks like flask-assets will not work in flask-2.3 and on:

.venv/lib/python3.11/site-packages/flask_assets.py:8
.venv/lib/python3.11/site-packages/flask_assets.py:8
  /Users/patrick/dev/triplynx3/.venv/lib/python3.11/site-packages/flask_assets.py:8: DeprecationWarning: '_request_ctx_stack' is deprecated and will be removed in Flask 2.3.
    from flask import _request_ctx_stack, current_app

.venv/lib/python3.11/site-packages/flask_assets.py:317: 11 warnings
tests/test_home.py: 239 warnings
  /Users/patrick/dev/triplynx3/.venv/lib/python3.11/site-packages/flask_assets.py:317: DeprecationWarning: '_request_ctx_stack' is deprecated and will be removed in Flask 2.3. Use 'g' to store data, or 'request_ctx' to access the current context.
    ctx = _request_ctx_stack.top

.venv/lib/python3.11/site-packages/flask_assets.py:322: 22 warnings
  /Users/patrick/dev/triplynx3/.venv/lib/python3.11/site-packages/flask_assets.py:322: DeprecationWarning: '_app_ctx_stack' is deprecated and will be removed in Flask 2.3.
    from flask import _app_ctx_stack

.venv/lib/python3.11/site-packages/flask_assets.py:323: 11 warnings
  /Users/patrick/dev/triplynx3/.venv/lib/python3.11/site-packages/flask_assets.py:323: DeprecationWarning: '_app_ctx_stack' is deprecated and will be removed in Flask 2.3. Use 'g' to store data, or 'app_ctx' to access the current context.
    app_ctx = _app_ctx_stack.top

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
zgoda commented 1 year ago

https://github.com/miracle2k/flask-assets/pull/155

prohde commented 1 year ago

While it raised a deprecation warning in Flask 2.3 it breaks with Flask 3.0.

greyli commented 1 year ago

Fixed in #155