Fix compatibility with flask 3

This commit is contained in:
Adrian Moennich 2023-10-10 11:26:08 +02:00
parent 40c3406e81
commit 140d1ecf9d
9 changed files with 8 additions and 10 deletions

View File

@ -5,6 +5,10 @@ to provide advanced search functionality using an Elasticsearch backend.
## Changelog
### 3.3
- Adapt to Indico 3.3 changes
### 3.2.2
- Adapt to Indico 3.2.6 changes

View File

@ -12,7 +12,7 @@ from collections import defaultdict
from functools import wraps
from flask import current_app
from flask.globals import _app_ctx_stack
from flask.globals import _cv_app
from indico.core.db import db
from indico.core.db.sqlalchemy.principals import PrincipalMixin, PrincipalPermissionsMixin, PrincipalType
@ -29,7 +29,7 @@ def parallelize(func, entries, batch_size=200):
finished = threading.Event()
results = []
app = current_app._get_current_object()
main_app_context = _app_ctx_stack.top
main_app_context = _cv_app.get(None)
worker_exc_info = None
def worker(iterator):

View File

@ -8,7 +8,6 @@ indico_plugins = livesync citadel
; fail if there are warnings, but ignore ones that are likely just noise
filterwarnings =
error
ignore:.*_app_ctx_stack.*:DeprecationWarning
ignore::sqlalchemy.exc.SAWarning
ignore::UserWarning
ignore:Creating a LegacyVersion has been deprecated:DeprecationWarning

View File

@ -1,6 +1,6 @@
[metadata]
name = indico-plugin-citadel
version = 3.2.2
version = 3.3-dev
description = Indico search+livesync backend using Citadel+ElasticSearch
long_description = file: README.md
long_description_content_type = text/markdown; charset=UTF-8; variant=GFM
@ -23,7 +23,7 @@ zip_safe = false
include_package_data = true
python_requires = >=3.9.0, <3.13
install_requires =
indico>=3.2.6
indico>=3.3.dev0
indico-plugin-livesync>=3.2.1
[options.entry_points]

View File

@ -8,7 +8,6 @@ indico_plugins = livesync
; fail if there are warnings, but ignore ones that are likely just noise
filterwarnings =
error
ignore:.*_app_ctx_stack.*:DeprecationWarning
ignore::sqlalchemy.exc.SAWarning
ignore::UserWarning
ignore:Creating a LegacyVersion has been deprecated:DeprecationWarning

View File

@ -8,7 +8,6 @@ indico_plugins = payment_paypal
; fail if there are warnings, but ignore ones that are likely just noise
filterwarnings =
error
ignore:.*_app_ctx_stack.*:DeprecationWarning
ignore::sqlalchemy.exc.SAWarning
ignore::UserWarning
ignore:Creating a LegacyVersion has been deprecated:DeprecationWarning

View File

@ -8,7 +8,6 @@ indico_plugins = livesync prometheus
; fail if there are warnings, but ignore ones that are likely just noise
filterwarnings =
error
ignore:.*_app_ctx_stack.*:DeprecationWarning
ignore::sqlalchemy.exc.SAWarning
ignore::UserWarning
ignore:Creating a LegacyVersion has been deprecated:DeprecationWarning

View File

@ -8,7 +8,6 @@ indico_plugins = storage_s3
; fail if there are warnings, but ignore ones that are likely just noise
filterwarnings =
error
ignore:.*_app_ctx_stack.*:DeprecationWarning
ignore::sqlalchemy.exc.SAWarning
ignore::UserWarning
ignore:Creating a LegacyVersion has been deprecated:DeprecationWarning

View File

@ -8,7 +8,6 @@ indico_plugins = vc_zoom
; fail if there are warnings, but ignore ones that are likely just noise
filterwarnings =
error
ignore:.*_app_ctx_stack.*:DeprecationWarning
ignore::sqlalchemy.exc.SAWarning
ignore::UserWarning
ignore:Creating a LegacyVersion has been deprecated:DeprecationWarning