summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-07-15 09:52:21 +0200
committerMichał Górny <mgorny@gentoo.org>2020-07-15 10:10:45 +0200
commit4a709fb2f8194cbef2bdedb886e02aaf799843c6 (patch)
tree18b7a147a71828dc72c9adc0bc68b3d7bae5bee0 /dev-python/flask-security/files
parentdev-python/cachetools: Bump to 4.1.1 (diff)
downloadgentoo-4a709fb2f8194cbef2bdedb886e02aaf799843c6.tar.gz
gentoo-4a709fb2f8194cbef2bdedb886e02aaf799843c6.tar.bz2
gentoo-4a709fb2f8194cbef2bdedb886e02aaf799843c6.zip
dev-python/flask-security: Bump to 3.4.3
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/flask-security/files')
-rw-r--r--dev-python/flask-security/files/flask-security-3.4.3-optional-deps.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/dev-python/flask-security/files/flask-security-3.4.3-optional-deps.patch b/dev-python/flask-security/files/flask-security-3.4.3-optional-deps.patch
new file mode 100644
index 000000000000..484e816908f4
--- /dev/null
+++ b/dev-python/flask-security/files/flask-security-3.4.3-optional-deps.patch
@@ -0,0 +1,63 @@
+From 8943f49c3e6064839bd1e3c2c73a750b2b476ae3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 15 Jul 2020 09:02:15 +0200
+Subject: [PATCH 1/2] tests: Skip tests requiring specific data backends if not
+ available
+
+Skip tests that require a specific database backend if the respective
+package is not available. This is mostly intended to make it possible
+to test flask-security on Python 3.9 since Pony does not support this
+Python version but there is no harm in extending it to other backends.
+
+Technically, Flask-SQLAlchemy is still required due to other tests.
+---
+ tests/conftest.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/tests/conftest.py b/tests/conftest.py
+index 3305d92..a48f480 100644
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -218,6 +218,7 @@ def mongoengine_datastore(request, app, tmpdir, realdburl):
+
+
+ def mongoengine_setup(request, app, tmpdir, realdburl):
++ pytest.importorskip('flask_mongoengine')
+ from flask_mongoengine import MongoEngine
+ from mongoengine.fields import (
+ BooleanField,
+@@ -282,6 +283,7 @@ def sqlalchemy_datastore(request, app, tmpdir, realdburl):
+
+
+ def sqlalchemy_setup(request, app, tmpdir, realdburl):
++ pytest.importorskip('flask_sqlalchemy')
+ from flask_sqlalchemy import SQLAlchemy
+ from flask_security.models import fsqla_v2 as fsqla
+
+@@ -326,6 +328,7 @@ def sqlalchemy_session_datastore(request, app, tmpdir, realdburl):
+
+
+ def sqlalchemy_session_setup(request, app, tmpdir, realdburl):
++ pytest.importorskip('sqlalchemy')
+ from sqlalchemy import create_engine
+ from sqlalchemy.orm import scoped_session, sessionmaker, relationship, backref
+ from sqlalchemy.ext.declarative import declarative_base
+@@ -426,6 +429,7 @@ def peewee_datastore(request, app, tmpdir, realdburl):
+
+
+ def peewee_setup(request, app, tmpdir, realdburl):
++ pytest.importorskip('peewee')
+ from peewee import (
+ TextField,
+ DateTimeField,
+@@ -522,6 +526,7 @@ def pony_datastore(request, app, tmpdir, realdburl):
+
+ def pony_setup(request, app, tmpdir, realdburl):
+
++ pytest.importorskip('pony')
+ from pony.orm import Database, Optional, Required, Set
+ from pony.orm.core import SetInstance
+
+--
+2.27.0
+