[Bug 277071] ImportError: cannot import name 'Markup' from 'flask'
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 277071] ImportError: cannot import name 'Markup' from 'flask'"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 277071] ImportError: cannot import name 'Markup' from 'flask'"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 277071] ImportError: cannot import name 'Markup' from 'flask'"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 277071] ImportError: cannot import name 'Markup' from 'flask'"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 277071] ImportError: cannot import name 'Markup' from 'flask'"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 277071] ImportError: cannot import name 'Markup' from 'flask'"
- Reply: bugzilla-noreply_a_freebsd.org: "[Bug 277071] ImportError: cannot import name 'Markup' from 'flask'"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 15 Feb 2024 13:51:11 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277071 Bug ID: 277071 Summary: ImportError: cannot import name 'Markup' from 'flask' Product: Ports & Packages Version: Latest Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: rm@FreeBSD.org Reporter: nospam@ofloo.net Assignee: rm@FreeBSD.org Flags: maintainer-feedback?(rm@FreeBSD.org) Running a script that uses flask. This issue is in 13.2 & 14.0 # pkg info py39-Flask-WTF py39-Flask-WTF-1.1.1_1 Name : py39-Flask-WTF Version : 1.1.1_1 Installed on : Thu Feb 15 14:50:11 2024 CET Origin : www/py-flask-wtf Architecture : FreeBSD:14:* Prefix : /usr/local Categories : www python Licenses : BSD3CLAUSE Maintainer : rm@FreeBSD.org WWW : https://flask-wtf.readthedocs.org/en/latest/ Comment : Simple integration of Flask and WTForms Traceback (most recent call last): File "/usr/local/micro/mapxl/mapxl.py", line 9, in <module> from modules.forms import UploadForm File "/usr/local/micro/mapxl/modules/forms.py", line 1, in <module> from flask_wtf import FlaskForm File "/usr/local/lib/python3.9/site-packages/flask_wtf/__init__.py", line 4, in <module> from .recaptcha import Recaptcha File "/usr/local/lib/python3.9/site-packages/flask_wtf/recaptcha/__init__.py", line 1, in <module> from .fields import RecaptchaField File "/usr/local/lib/python3.9/site-packages/flask_wtf/recaptcha/fields.py", line 3, in <module> from . import widgets File "/usr/local/lib/python3.9/site-packages/flask_wtf/recaptcha/widgets.py", line 2, in <module> from flask import Markup ImportError: cannot import name 'Markup' from 'flask' (/usr/local/lib/python3.9/site-packages/flask/__init__.py) Standard lib tries to import markup from flask: /usr/local/lib/python3.9/site-packages/flask_wtf/recaptcha/widgets.py from flask import current_app from flask import Markup from werkzeug.urls import url_encode RECAPTCHA_SCRIPT_DEFAULT = "https://www.google.com/recaptcha/api.js" RECAPTCHA_DIV_CLASS_DEFAULT = "g-recaptcha" RECAPTCHA_TEMPLATE = """ <script src='%s' async defer></script> <div class="%s" %s></div> """ __all__ = ["RecaptchaWidget"] class RecaptchaWidget: def recaptcha_html(self, public_key): html = current_app.config.get("RECAPTCHA_HTML") if html: return Markup(html) params = current_app.config.get("RECAPTCHA_PARAMETERS") script = current_app.config.get("RECAPTCHA_SCRIPT") if not script: script = RECAPTCHA_SCRIPT_DEFAULT if params: -- You are receiving this mail because: You are the assignee for the bug.