-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
Move away from legacy importlib.resources API #19091
Move away from legacy importlib.resources API #19091
Conversation
importlib.resources deprecated the top-level read_binary() and similar functions in favor of the new files() API. This is only available in Python 3.9 and later, so the importlib-resources backport has been bumped to be also installed on 3.7 and 3.8.
BTW the |
CC: @lwyszomi |
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
🎉 🎉 🎉 |
Reopening to check if it works for all Python versions. |
07afbfa
to
b213021
Compare
A couple of jobs got killed but CI otherwise passing. Should be good to go. |
(cherry picked from commit ed40c4b)
importlib.resources
deprecated the top-levelread_binary()
and similar functions in favor of the newfiles()
API. This is only available in Python 3.9 and later, so theimportlib-resources
backport has been bumped to be also installed on 3.7 and 3.8.This should fix the errors in the provider tests and make CI green again.