Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-Flask-Security-Too for openSUSE:Factory checked in at 2023-01-06 17:05:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Flask-Security-Too (Old) and /work/SRC/openSUSE:Factory/.python-Flask-Security-Too.new.1563 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Flask-Security-Too" Fri Jan 6 17:05:52 2023 rev:13 rq:1056308 version:5.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Flask-Security-Too/python-Flask-Security-Too.changes 2022-10-03 15:59:30.490972210 +0200 +++ /work/SRC/openSUSE:Factory/.python-Flask-Security-Too.new.1563/python-Flask-Security-Too.changes 2023-01-06 17:06:39.264551588 +0100 @@ -1,0 +2,6 @@ +Fri Jan 6 03:54:08 UTC 2023 - Steve Kowalik <steven.kowa...@suse.com> + +- Add patch support-Flask-SQLAlchemy-3.0.patch: + * Support Flask-SQLAlchemy >= 3.0 + +------------------------------------------------------------------- New: ---- support-Flask-SQLAlchemy-3.0.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Flask-Security-Too.spec ++++++ --- /var/tmp/diff_new_pack.2wXKng/_old 2023-01-06 17:06:39.696554014 +0100 +++ /var/tmp/diff_new_pack.2wXKng/_new 2023-01-06 17:06:39.700554037 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-Flask-Security-Too # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,7 +26,10 @@ URL: https://github.com/Flask-Middleware/flask-security Source: https://files.pythonhosted.org/packages/source/F/Flask-Security-Too/Flask-Security-Too-%{version}.tar.gz Patch0: no-mongodb.patch +# PATCH-FIX-OPENSUSE Use pyqrcodeng, we do not ship qrcode in OpenSUSE. Patch1: use-pyqrcodeng.patch +# PATCH-FIX-UPSTREAM gh#Flask-Middleware/flask-security#9632a0eab5d3be4280c185e7e934a57fc24057a2 +Patch2: support-Flask-SQLAlchemy-3.0.patch BuildRequires: %{python_module Babel >= 2.9.1} BuildRequires: %{python_module Flask >= 1.1.1} BuildRequires: %{python_module Flask-Babel >= 2.0.0} ++++++ support-Flask-SQLAlchemy-3.0.patch ++++++ >From 9632a0eab5d3be4280c185e7e934a57fc24057a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Rast?= <jue...@gmail.com> Date: Mon, 26 Sep 2022 16:35:31 +0200 Subject: [PATCH] Fixed issues related to upcomming flask-sqlalchemy 3.0.0 release (#678) - rename of get_debug_queries to get_recorded_queries (and move to to new module) - SQLALCHEMY_RECORD_QUERIES must be set explicit --- tests/conftest.py | 4 ++++ tests/test_utils.py | 11 ++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index b9076413..f5e41a43 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -410,6 +410,10 @@ def sqlalchemy_setup(request, app, tmpdir, realdburl): else: app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///:memory:" + # In Flask-SQLAlchemy >= 3.0.0 queries are no longer logged automatically, + # even in debug or testing mode. + app.config["SQLALCHEMY_RECORD_QUERIES"] = True + db = SQLAlchemy(app) fsqla.FsModels.set_db_info(db) diff --git a/tests/test_utils.py b/tests/test_utils.py index df569a74..5c63dc55 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -201,9 +201,14 @@ def get_num_queries(datastore): return None if datastore doesn't support this. """ if is_sqlalchemy(datastore): - from flask_sqlalchemy import get_debug_queries - - return len(get_debug_queries()) + try: + # Flask-SQLAlachemy >= 3.0.0 + from flask_sqlalchemy.record_queries import get_recorded_queries + except ImportError: + # Flask-SQLAlchemy < 3.0.0 + from flask_sqlalchemy import get_debug_queries as get_recorded_queries + + return len(get_recorded_queries()) return None