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

Skip multiple version of plugin warning if the metadata is equal #380

Merged
merged 2 commits into from
Jan 26, 2021

Conversation

asnyv
Copy link
Collaborator

@asnyv asnyv commented Jan 21, 2021

Contributor checklist

@asnyv asnyv marked this pull request as ready for review January 21, 2021 20:24
Copy link
Collaborator

@anders-kiaer anders-kiaer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a reasonable change👍

Maybe not the most common use case, but do we know what happens e.g. if:

  1. webviz-config + webviz-subsurface is installed in system Python.
  2. You create a venv with --system-site-packages.
  3. You source the venv and pip install --upgrade webviz-config webviz-subsurface.

Will it currently give a warning (and then also after this one, if the --upgrade bumps the plugin package version)?

Comment on lines +61 to +69
metadata[entry_point.name] = PluginDistInfo(
{
"dist_name": dist.metadata["name"],
"dist_version": dist.version,
"documentation_url": project_urls.get("Documentation"),
"download_url": project_urls.get("Download"),
"tracker_url": project_urls.get("Tracker"),
}
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define this metadata dictionary once as a variable? Here it is introduced two times (more work to maintain)?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest just leaving the duplication for now. My upcoming and revised #377 ends up rewriting/moving this code so the duplication can removed then.

@anders-kiaer anders-kiaer dismissed their stale review January 22, 2021 18:55

Requested change will be adressed by #377.

@asnyv asnyv merged commit 8dc0a12 into equinor:master Jan 26, 2021
@asnyv asnyv deleted the mute_warning branch January 26, 2021 14:14
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.

symlinked lib and lib64 in venv gives warning of multiple versions of same plugin
4 participants