vatsrahul1001 opened a new issue, #48587:
URL: https://github.com/apache/airflow/issues/48587
### Apache Airflow version
3.0.0
### If "Other Airflow 2 version" selected, which one?
_No response_
### What happened?
In Airflow 2, logical_date was a Pendulum datetime object, allowing the use
of logical_date.add(minutes=3). However, in Airflow 3, logical_date is now a
Python datetime object, which does not have an add() method.
### What you think should happen instead?
_No response_
### How to reproduce
Try below DAG
```
from airflow.decorators import dag, task
from airflow.providers.standard.sensors.date_time import DateTimeSensor,
DateTimeSensorAsync
from pendulum import today
from datetime import datetime, timedelta
@task
def before():
print("before")
@task
def after():
print("after")
@dag(
schedule="*/2 * * * *",
start_date=today('UTC').add(days=-1),
default_args={"owner": "airflow"},
catchup=False,
)
def each_two_wait_three_async():
"""
Execute after each two-minute interval, and
finish no earlier than three minutes after that interval starts.
"""
(
before()
>> DateTimeSensorAsync(
task_id="wait_exec_plus_three",
target_time="{{ logical_date.add(minutes=3) }}",
)
```
>> after()
)
the_async_dag = each_two_wait_three_async()
### Operating System
Linux
### Versions of Apache Airflow Providers
_No response_
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
_No response_
### Anything else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]