Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve deprecation warning re Table.exists() #26616

Merged
merged 3 commits into from Sep 23, 2022

Conversation

dstandish
Copy link
Contributor

The deprecation warning tells us we need to change Table.exists() to Inspector.has_table(). It turns out we're already using the right method, but we weren't passing it the right object. It wants a table name but we were giving it a table.

@uranusjr do you think it's safe to remove the compat layer altogether?

image

@uranusjr
Copy link
Member

I think so, we are now requiring sqlalchemy>=1.4, which should always contain the new functions.

@uranusjr uranusjr added this to the Airflow 2.4.1 milestone Sep 23, 2022
@uranusjr
Copy link
Member

Need to fix compat shim usages in migration files

The deprecation warning tells us we need to change Table.exists() to Inspector.has_table().  It turns out we're already using the right method, but we weren't passing it the right object.  It wants a table name but we were giving it a table.
@jedcunningham jedcunningham merged commit 2388bd7 into apache:main Sep 23, 2022
@jedcunningham jedcunningham deleted the fix-has_table-warning branch September 23, 2022 20:30
@jedcunningham jedcunningham added the type:bug-fix Changelog: Bug Fixes label Sep 23, 2022
jedcunningham pushed a commit that referenced this pull request Sep 27, 2022
The deprecation warning tells us we need to change Table.exists() to Inspector.has_table().  It turns out we're already using the right method, but we weren't passing it the right object.  It wants a table name but we were giving it a table.

(cherry picked from commit 2388bd7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants