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

Stop using deprecated imp package in Python tests #7769

Merged
merged 2 commits into from
Jan 10, 2023

Conversation

musicinmybrain
Copy link
Contributor

It is deprecated in favour of importlib and slated for removal in Python 3.12. Since the return value of imp.find_module('numpy') is unused, the only effect of calling this function is to raise an ImportError when numpy is not available; importing numpy directly is already sufficient to do this.

The imp package is still used in python/flatbuffers/compat.py, but only on Python 2, where it is not deprecated and will not be removed.

@github-actions github-actions bot added the python label Jan 8, 2023
It is deprecated in favour of importlib and slated for removal in Python
3.12. Since the return value of imp.find_module('numpy') is unused, the
only effect of calling this function is to raise an ImportError when
numpy is not available; importing numpy directly is already sufficient
to do this.

The imp package is still used in python/flatbuffers/compat.py, but only
on Python 2, where it is not deprecated and will not be removed.
@dbaileychess dbaileychess merged commit 4e75867 into google:master Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants