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

DM-30855: Fix support for click 8.x #541

Merged
merged 5 commits into from Jun 23, 2021
Merged

DM-30855: Fix support for click 8.x #541

merged 5 commits into from Jun 23, 2021

Conversation

timj
Copy link
Member

@timj timj commented Jun 23, 2021

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

n8pease and others added 3 commits June 23, 2021 08:22
It would be nice to be able to verify a sensible error message is
returned for the failure condition but the click UI is too dynamic;
so instead we test for a failure (non-zero exit code) but otherwise
punt on verifying exactly _what_ failed.
@@ -490,7 +490,7 @@ def convert(self, value, param, ctx):
"""Called by click.ParamType to "convert values through types".
`click.Path` uses this step to verify Path conditions."""
if self.mustNotExist and os.path.exists(value):
self.fail(f'{self.path_type} "{value}" should not exist.')
self.fail(f'Path "{value}" should not exist.')
Copy link
Member Author

Choose a reason for hiding this comment

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

Turns out that in click 8 they changed .path_type to .type (presumably for consistency).

timj added 2 commits June 23, 2021 16:18
They have replaced with Path.type but supporting this would mean
special logic for click7 and the type is always going to be
str in our usage.
@timj timj merged commit 5a94d85 into master Jun 23, 2021
@timj timj deleted the tickets/DM-30855 branch June 23, 2021 23:39
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.

None yet

2 participants