Skip to content

Commit

Permalink
Switch from flask.Markup to MarkupSafe
Browse files Browse the repository at this point in the history
[Flask 2.3.0](https://flask.palletsprojects.com/en/3.0.x/changes/#version-2-3-0)
deprecated its Markup class in favor of of MarkupSafe.  This causes an
import error when using Flask-FomanticUI with newer Flask releases.

Fixes juniors90#3
  • Loading branch information
xenophonf committed Sep 7, 2024
1 parent efbbded commit cffa469
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion flask_fomanticui/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@

import warnings

from flask import Blueprint, Markup, current_app, url_for
from flask import Blueprint, current_app, url_for

from markupsafe import Markup

try: # pragma: no cover
from wtforms.fields import HiddenField
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
PATH = pathlib.Path(os.path.abspath(os.path.dirname(__file__)))


REQUIREMENTS = ["Flask>=2.0.2"]
REQUIREMENTS = ["Flask>=2.3.0", "markupsafe"]

with open(PATH / "flask_fomanticui" / "__init__.py") as fp:
for line in fp.readlines():
Expand Down

0 comments on commit cffa469

Please sign in to comment.