diff --git a/flask-2.3-support.patch b/flask-2.3-support.patch deleted file mode 100644 index d868a91..0000000 --- a/flask-2.3-support.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 603318bfb31958572ff250fa29fc4e4678d438c8 Mon Sep 17 00:00:00 2001 -From: Matt Shaw -Date: Tue, 25 Apr 2023 22:07:52 +0100 -Subject: [PATCH 1/2] fix #561 - ---- - src/flask_wtf/recaptcha/widgets.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: Flask-WTF-1.1.1/src/flask_wtf/recaptcha/widgets.py -=================================================================== ---- Flask-WTF-1.1.1.orig/src/flask_wtf/recaptcha/widgets.py -+++ Flask-WTF-1.1.1/src/flask_wtf/recaptcha/widgets.py -@@ -1,6 +1,7 @@ -+from urllib.parse import urlencode -+ - from flask import current_app --from flask import Markup --from werkzeug.urls import url_encode -+from markupsafe import Markup - - RECAPTCHA_SCRIPT_DEFAULT = "https://www.google.com/recaptcha/api.js" - RECAPTCHA_DIV_CLASS_DEFAULT = "g-recaptcha" -@@ -22,7 +23,7 @@ class RecaptchaWidget: - if not script: - script = RECAPTCHA_SCRIPT_DEFAULT - if params: -- script += "?" + url_encode(params) -+ script += "?" + urlencode(params) - attrs = current_app.config.get("RECAPTCHA_DATA_ATTRS", {}) - attrs["sitekey"] = public_key - snippet = " ".join(f'data-{k}="{attrs[k]}"' for k in attrs) # noqa: B028 -Index: Flask-WTF-1.1.1/docs/changes.rst -=================================================================== ---- Flask-WTF-1.1.1.orig/docs/changes.rst -+++ Flask-WTF-1.1.1/docs/changes.rst -@@ -1,6 +1,14 @@ - Changes - ======= - -+Version 1.1.2 -+------------- -+ -+Unreleased -+ -+- Fixed Flask 2.3 deprecations of ``werkzeug.urls.url_encode`` and -+ ``flask.Markup`` `:pr:`565` :issue:`561` -+ - Version 1.1.1 - ------------- - -Index: Flask-WTF-1.1.1/src/flask_wtf/recaptcha/validators.py -=================================================================== ---- Flask-WTF-1.1.1.orig/src/flask_wtf/recaptcha/validators.py -+++ Flask-WTF-1.1.1/src/flask_wtf/recaptcha/validators.py -@@ -1,9 +1,9 @@ - import json - from urllib import request as http -+from urllib.parse import urlencode - - from flask import current_app - from flask import request --from werkzeug.urls import url_encode - from wtforms import ValidationError - - RECAPTCHA_VERIFY_SERVER_DEFAULT = "https://www.google.com/recaptcha/api/siteverify" -@@ -54,7 +54,7 @@ class Recaptcha: - if not verify_server: - verify_server = RECAPTCHA_VERIFY_SERVER_DEFAULT - -- data = url_encode( -+ data = urlencode( - {"secret": private_key, "remoteip": remote_addr, "response": response} - ) - -Index: Flask-WTF-1.1.1/tests/test_recaptcha.py -=================================================================== ---- Flask-WTF-1.1.1.orig/tests/test_recaptcha.py -+++ Flask-WTF-1.1.1/tests/test_recaptcha.py -@@ -80,7 +80,6 @@ def test_render_custom_args(app): - app.config["RECAPTCHA_DATA_ATTRS"] = {"red": "blue"} - f = RecaptchaForm() - render = f.recaptcha() -- # new versions of url_encode allow more characters - assert "?key=(value)" in render or "?key=%28value%29" in render - assert 'data-red="blue"' in render - diff --git a/flask_wtf-1.2.1.tar.gz b/flask_wtf-1.2.1.tar.gz new file mode 100644 index 0000000..9e74d75 --- /dev/null +++ b/flask_wtf-1.2.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8bb269eb9bb46b87e7c8233d7e7debdf1f8b74bf90cc1789988c29b37a97b695 +size 42498 diff --git a/python-Flask-WTF.changes b/python-Flask-WTF.changes index c19471e..17e0bdd 100644 --- a/python-Flask-WTF.changes +++ b/python-Flask-WTF.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Mon Nov 27 08:10:47 UTC 2023 - Antonio Larrosa + +- Update to 1.2.1: + * Fix a bug introduced with #556 in 1.2.0 where file validators + were editing the file fields content. +- Update to 1.2.0: + * Add field MultipleFileField. FileRequired, FileAllowed, + FileSize now can be used to validate multiple files +- Update to 1.1.2: + * Fixed Flask 2.3 deprecations of werkzeug.urls.url_encode and + flask.Markup + * Stop support for python 3.7 + * Use pyproject.toml instead of setup.cfg + * Fixed nested blueprint CSRF exemption +- Drop patch already included upstream: + * flask-2.3-support.patch + ------------------------------------------------------------------- Fri Jun 30 05:16:29 UTC 2023 - Steve Kowalik diff --git a/python-Flask-WTF.spec b/python-Flask-WTF.spec index 4ff763d..7dca0ca 100644 --- a/python-Flask-WTF.spec +++ b/python-Flask-WTF.spec @@ -18,15 +18,14 @@ %bcond_without test Name: python-Flask-WTF -Version: 1.1.1 +Version: 1.2.1 Release: 0 Summary: WTForms support for Flask License: BSD-3-Clause URL: https://github.com/lepture/flask-wtf -Source: https://files.pythonhosted.org/packages/source/F/Flask-WTF/Flask-WTF-%{version}.tar.gz -# PATCH-FIX-UPSTREAM gh#wtforms/flask-wtf#565 -Patch0: flask-2.3-support.patch -BuildRequires: %{python_module base >= 3.7} +Source: https://files.pythonhosted.org/packages/source/F/Flask-WTF/flask_wtf-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module hatchling} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} @@ -52,7 +51,7 @@ BuildRequires: %{python_module pytest} Adds WTForms support to your Flask application %prep -%autosetup -p1 -n Flask-WTF-%{version} +%autosetup -p1 -n flask_wtf-%{version} %build %pyproject_wheel @@ -72,6 +71,6 @@ export LANG=en_US.UTF-8 %license LICENSE.rst %doc README.rst %{python_sitelib}/flask_wtf -%{python_sitelib}/Flask_WTF-%{version}.dist-info +%{python_sitelib}/flask_wtf-%{version}.dist-info %changelog