Skip to content

Conversation

@zachliu
Copy link
Contributor

@zachliu zachliu commented Oct 6, 2025

poke_mode_only is supposed to be imported from a new location in Airflow 3.1+

__deprecated_classes = {
"base": {
"BaseSensorOperator": "airflow.sdk.bases.sensor.BaseSensorOperator",
"PokeReturnValue": "airflow.sdk.bases.sensor.PokeReturnValue",
"poke_mode_only": "airflow.sdk.bases.sensor.poke_mode_only",
},

We see this deprecation warning

DeprecatedImportWarning: The `airflow.sensors.base.poke_mode_only` attribute is deprecated. Please use `'airflow.sdk.bases.sensor.poke_mode_only'`.

because the latest providers-amazon is still importing from the old location

from airflow.sensors.base import poke_mode_only


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@boring-cyborg boring-cyborg bot added area:providers provider:amazon AWS/Amazon - related issues labels Oct 6, 2025
@amoghrajesh
Copy link
Contributor

@zachliu could you please add a more descriptive PR title?

@zachliu zachliu changed the title fix the deprecation warning Add poke_mode_only to version_compat to fix the incorrect deprecation warning Oct 9, 2025
@zachliu
Copy link
Contributor Author

zachliu commented Oct 9, 2025

@amoghrajesh done 🚀

@potiuk potiuk merged commit 75cb73f into apache:main Oct 13, 2025
82 checks passed
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 14, 2025
… warning (apache#56435)

* fix the deprecation warning

* for pre-3.1 versions
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 15, 2025
… warning (apache#56435)

* fix the deprecation warning

* for pre-3.1 versions
@zachliu zachliu deleted the fix-deprecation-warning branch October 15, 2025 21:13
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 17, 2025
… warning (apache#56435)

* fix the deprecation warning

* for pre-3.1 versions
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 19, 2025
… warning (apache#56435)

* fix the deprecation warning

* for pre-3.1 versions
TyrellHaywood pushed a commit to TyrellHaywood/airflow that referenced this pull request Oct 22, 2025
… warning (apache#56435)

* fix the deprecation warning

* for pre-3.1 versions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:amazon AWS/Amazon - related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants