Remove dead pkg_resources fallback for entry_points#2482
Open
junagent wants to merge 1 commit intovaexio:masterfrom
Open
Remove dead pkg_resources fallback for entry_points#2482junagent wants to merge 1 commit intovaexio:masterfrom
junagent wants to merge 1 commit intovaexio:masterfrom
Conversation
The pkg_resources fallback is unreachable since Python 3.9+ (vaex's minimum Python version) always has importlib.metadata. Since importlib.metadata is in stdlib since Python 3.8, the fallback is dead code. Fixes #13688
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove unreachable
pkg_resourcesfallback code inpackages/vaex-core/vaex/__init__.py- this is a dead code removal PR.Problem
The code had a 3-level fallback for importing
entry_points:The
pkg_resourcesfallback (theexcept ImportError:block) is dead code:numpy>=1.19.3,<3) always hasimportlib.metadataimportlib.metadatahas been stdlib since Python 3.8except ImportErrorblock is never reachedFix
Replace the 9-line fallback block with a single import:
Testing