Taragolis commented on code in PR #38140:
URL: https://github.com/apache/airflow/pull/38140#discussion_r1524456817
##########
pyproject.toml:
##########
@@ -72,7 +72,9 @@ dependencies = [
"argcomplete>=1.10",
"asgiref",
"attrs>=22.1.0",
- "blinker",
+ # Blicker use for signals in Flask, this is an optional dependency in
Flask 2.2 and lower.
+ # In Flask 2.3 it becomes a mandatory dependency, and flask signals are
always available.
+ "blinker>=1.6.2",
Review Comment:
```console
root@a01ad49f07db:/opt/airflow# pipdeptree --packages blinker -r
blinker==1.7.0
└── apache-airflow==2.9.0.dev0 [requires: blinker]
```
The min version taken from Flask 2.3 requires dependencies
##########
airflow/sentry.py:
##########
@@ -55,9 +55,6 @@ def flush(self):
Sentry: DummySentry = DummySentry()
if conf.getboolean("sentry", "sentry_on", fallback=False):
import sentry_sdk
-
- # Verify blinker installation
- from blinker import signal # noqa: F401
Review Comment:
This comes from PR: https://github.com/apache/airflow/pull/6365
Info from https://issues.apache.org/jira/browse/AIRFLOW-5694#
---
**Affects Version/s**: 1.10.6
**Fix Version/s**: 1.10.7
After upgrading to 1.10.6rc1 with `sentry-sdk` installed but not specifying
the `[sentry]` extra, the dependency
`blinker` will cause failures of the following form:
``` console
../lib/python3.7/site-packages/airflow/__init__.py:40: in <module>
from airflow.models import DAG
../lib/python3.7/site-packages/airflow/models/__init__.py:21: in <module>
from airflow.models.baseoperator import BaseOperator # noqa: F401
../lib/python3.7/site-packages/airflow/models/baseoperator.py:42: in <module>
from airflow.models.dag import DAG
../lib/python3.7/site-packages/airflow/models/dag.py:51: in <module>
from airflow.models.taskinstance import TaskInstance,
clear_task_instances
../lib/python3.7/site-packages/airflow/models/taskinstance.py:53: in <module>
from airflow.sentry import Sentry
../lib/python3.7/site-packages/airflow/sentry.py:167: in <module>
Sentry = ConfiguredSentry()
../lib/python3.7/site-packages/airflow/sentry.py:94: in __init__
init(integrations=integrations)
../lib/python3.7/site-packages/sentry_sdk/hub.py:81: in _init
client = Client(*args, **kwargs) # type: ignore
../lib/python3.7/site-packages/sentry_sdk/client.py:80: in __init__
self._init_impl()
../lib/python3.7/site-packages/sentry_sdk/client.py:108: in _init_impl
with_defaults=self.options["default_integrations"],
../lib/python3.7/site-packages/sentry_sdk/integrations/__init__.py:82: in
setup_integrations
type(integration).setup_once()
../lib/python3.7/site-packages/sentry_sdk/integrations/flask.py:57: in
setup_once
appcontext_pushed.connect(_push_appctx)
../lib/python3.7/site-packages/flask/signals.py:39: in _fail
"Signalling support is unavailable because the blinker"
E RuntimeError: Signalling support is unavailable because the blinker
library is not installed.
```
##########
airflow/sentry.py:
##########
@@ -55,9 +55,6 @@ def flush(self):
Sentry: DummySentry = DummySentry()
if conf.getboolean("sentry", "sentry_on", fallback=False):
import sentry_sdk
-
- # Verify blinker installation
- from blinker import signal # noqa: F401
Review Comment:
Since some of the version it is become core dependency, so we do not need
this "check", and in addition Sentry Flask Integration also validate is blinker
installed or not
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]