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

fix(#2675): replace entrypoints with importlib.metadata #2686

Merged
merged 3 commits into from
Dec 27, 2022

Conversation

daylinmorgan
Copy link
Contributor

As mentioned in #2675, entrypoints is now in maintenance mode. We can replace it with importlib.metadata and remove the extra dependency for python < 3.8.

@daylinmorgan
Copy link
Contributor Author

Ah! Tested locally with 3.10 and 3.6. Missed that the selection interface was added in 3.10. I'll update this to parse the dict from entry_points() instead.

@mattijn
Copy link
Contributor

mattijn commented Oct 29, 2022

Thanks for the PR @daylinmorgan! Can you synchronize this PR with the latest changes on master? Hopefully @joelostblom can do a review here.
A bit of explanation of the suggested changes would help as well.

@daylinmorgan
Copy link
Contributor Author

This has been rebased on master.

PR drops unnecessary (and the now in maintenance mode) entrypoints module for a standard library equivalent where possible and otherwise relies on the backport (python <3.8).

@mattijn
Copy link
Contributor

mattijn commented Nov 1, 2022

Thanks @daylinmorgan!
Honestly, I'm not very familiar with the entrypoints concept. Reading https://amir.rachum.com/amp/blog/2017/07/28/python-entry-points.html was a fun introduction.
I am interested in approaches where and how this is being used in corporation with Altair. Are you aware of any examples of this usage?
In other words, how to test this?

@daylinmorgan
Copy link
Contributor Author

The entrypoints I'm aware of are in altair_saver and altair_viewer

@mattijn
Copy link
Contributor

mattijn commented Nov 1, 2022

Thanks! It is out of scope of this PR, but it seems the entry points in these packages also require updating once Altair is going to vegalite 5. The entry points should become "altair.vegalite.v5.renderer" I think.

Again out of scope, but I'm wondering if it already breaks on the main repo of Altair if a specific VL5 spec is parsed through these entry points.

I'm fine with this PR, you also @joelostblom?

@mattijn mattijn merged commit 720f009 into vega:master Dec 27, 2022
@mattijn
Copy link
Contributor

mattijn commented Dec 27, 2022

Thank you @daylinmorgan!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants