File tree 1 file changed +9
-1
lines changed
instana/instrumentation/flask
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 5
5
6
6
try :
7
7
import flask
8
- from flask .signals import signals_available
9
8
10
9
# `signals_available` indicates whether the Flask process is running with or without blinker support:
11
10
# https://pypi.org/project/blinker/
12
11
#
13
12
# Blinker support is preferred but we do the best we can when it's not available.
14
13
#
14
+ flask_version = tuple (map (int , flask .__version__ .split ('.' )))
15
+ if flask_version < (2 , 3 , 0 ):
16
+ from flask .signals import signals_available
17
+ else :
18
+ # Beginning from 2.3.0 as stated in the notes
19
+ # https://flask.palletsprojects.com/en/2.3.x/changes/#version-2-3-0
20
+ # "Signals are always available. blinker>=1.6.2 is a required dependency.
21
+ # The signals_available attribute is deprecated. #5056"
22
+ signals_available = True
15
23
16
24
from . import common
17
25
You can’t perform that action at this time.
0 commit comments