-
-
Notifications
You must be signed in to change notification settings - Fork 748
drop pkg_resources in favour of importlib.metadata #5923
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
Conversation
Unit Test Results 12 files ±0 12 suites ±0 6h 4m 15s ⏱️ + 11m 58s For more details on these failures, see this check. Results for commit 266c14e. ± Comparison against base commit 7a69b5e. ♻️ This comment has been updated with latest results. |
7f66f83 to
7c5e8f7
Compare
| # Code adapted from pandas backend entry point testing | ||
| # https://github.com/pandas-dev/pandas/blob/2470690b9f0826a8feb426927694fa3500c3e8d2/pandas/tests/plotting/test_backend.py#L50-L76 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pandas test_register_entrypoint now looks like this: https://github.com/pandas-dev/pandas/blob/48d515958d5805f0e62e34b7424097e5575089a8/pandas/tests/plotting/test_backend.py#L47-L62
I used:
monkeypatch.syspath_prepend(tmp_path)
monkeypatch.setitem(sys.modules, "pandas_dummy_backend", dummy_backend)
in the pandas version of this PR because they already do a lot of mutating of sys.modules so figured a sys.path mutation wasn't so bad. Here I use a multiprocessing.Pool(1) to isolate sys.modules and sys.path changes
7c5e8f7 to
266c14e
Compare
crusaderky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good
re: https://setuptools.pypa.io/en/latest/pkg_resources.html
pre-commit run --all-files