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

Use version specifiers in PluginRequirement #679

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

mdellweg
Copy link
Member

Review Checklist:

  • An issue is properly linked. [feature and bugfix only]
  • Tests are present or not feasible.
  • Commits are split in a logical way (not historically).

@mdellweg
Copy link
Member Author

When you realize, you reinvented the wheel...

@mdellweg
Copy link
Member Author

sed -i -E -e 's/PluginRequirement\("(.*)", (min=)?"([0-9.]*(dev)?)"(, inverted=True)?(, feature=.*)?\)/PluginRequirement("\1", specifier=">=\3"\5\6)/' pulpcore/cli/*/*.py pulp-glue/pulp_glue/*/*.py docs/*
sed -i -E -e 's/PluginRequirement\("(.*)", max="([0-9.]*(dev)?)"(, inverted=True)?(, feature=.*)?\)/PluginRequirement("\1", specifier="<\2"\4\5)/' pulpcore/cli/*/*.py pulp-glue/pulp_glue/*/*.py docs/*

@mdellweg mdellweg force-pushed the plugin_spec branch 2 times, most recently from 50e95ad to 31bc0c3 Compare April 17, 2023 17:00
@mdellweg mdellweg linked an issue Apr 17, 2023 that may be closed by this pull request
@mdellweg mdellweg marked this pull request as ready for review April 17, 2023 17:00
@@ -88,7 +88,7 @@ class PulpDomainContext(PulpEntityContext):
ENTITIES = _("Pulp domains")
HREF = "domain_href"
ID_PREFIX = "domains"
NEEDS_PLUGINS = [PluginRequirement("core", "3.23.0.dev")]
NEEDS_PLUGINS = [PluginRequirement("core", specifier=">=3.23.0")]
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -77,7 +77,7 @@ def _object_required_grouprole_lookup_callback(
"core:domain": PulpDomainContext,
},
"help": _("Domain the role is applied in"),
"needs_plugins": (PluginRequirement("core", "3.23.dev"),),
"needs_plugins": (PluginRequirement("core", specifier=">=3.23"),),
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

PluginRequirement(
"ansible", min="0.15.0.dev", feature="gpgkeys on ansible repositories"
)
PluginRequirement("ansible", min="0.15.0", feature="gpgkeys on ansible repositories")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
PluginRequirement("ansible", min="0.15.0", feature="gpgkeys on ansible repositories")
PluginRequirement("ansible", specifier=">=0.15.0", feature="gpgkeys on ansible repositories")

Copy link
Member Author

Choose a reason for hiding this comment

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

programmers blind spot...

@mdellweg mdellweg enabled auto-merge (rebase) April 19, 2023 11:57
@mdellweg mdellweg merged commit 2e797bb into pulp:main Apr 19, 2023
@mdellweg mdellweg deleted the plugin_spec branch April 19, 2023 13:58
@mdellweg mdellweg added this to the 0.20.0 milestone Apr 19, 2023
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.

Allow pep-440 style version specification for version dependent code
2 participants