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

pythonpackage can't return build requirements for wheels, make it return an error if attempted #1852

Merged
merged 1 commit into from Jun 10, 2019

Conversation

ghost
Copy link

@ghost ghost commented Jun 8, 2019

This change ensures the pythonpackage functions return an error when someone attempts to get build requirements of a wheel (beyond the regular runtime dependencies) since this is currently not implemented properly.

It might be possible to determine and obtain this info somehow, but since this is not ever actually used by our setup.py functionality I have made sure it raises a NotImplementedError now if this is ever attempted, instead of returning incorrect data as previously.

This should also fix the test failure of test_pythonpackage_basic.py on current latest develop.

@ghost ghost added the bug label Jun 8, 2019
@ghost
Copy link
Author

ghost commented Jun 8, 2019

This bug mainly manifests itself in that unit test by the way, not any situation I can think of when actually using the setup.py in practice. So there shouldn't be any huge reason to rush merging this

Make sure the pythonpackage functions return an error when
someone attempts to do so anyway
@ghost ghost changed the title [WIP] pythonpackage can't return build requirements for wheels, make it return an error if attempted pythonpackage can't return build requirements for wheels, make it return an error if attempted Jun 8, 2019
Copy link
Member

@inclement inclement left a comment

Choose a reason for hiding this comment

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

Definitely a more interesting bug than I expected, thanks for the quick fix!

"python-for-android", include_build_requirements=True,
verbose=True,
)
except NotImplementedError as e:
Copy link
Member

Choose a reason for hiding this comment

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

I'd be tempted to make an IsWheelError subclass or something, on the basis that specific exceptions aren't used often enough, but I'm never really sure about this.

Copy link
Author

@ghost ghost Jun 9, 2019

Choose a reason for hiding this comment

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

@inclement I'm somehow afraid somebody will use that to test if a package is a wheel and then end up with broken code once it is actually implemented and this no longer returns an error (or they use it right but we remove the error so it can no longer be imported once this is implemented and therefore no longer ever thrown, and that breaks their code). So I think I'd rather stick with a NotImplementedError here, personally

Copy link
Author

Choose a reason for hiding this comment

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

@inclement what are your thoughts on my thought on this? 😛 other than this I think it's ready for merge

Copy link
Member

Choose a reason for hiding this comment

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

I'm merging, we can always eventually address that one later if we feel it's critical

Copy link
Member

Choose a reason for hiding this comment

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

I wouldn't have approved the PR if I thought this needed changing, sorry if that wasn't clear and thanks for explaining the motivation!

Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

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

thanks

@opacam opacam added the Priority: Critical This should be dealt with ASAP. Not fixing this issue would be a serious error. label Jun 10, 2019
@AndreMiras AndreMiras merged commit 26dfac2 into kivy:develop Jun 10, 2019
@opacam
Copy link
Member

opacam commented Jun 10, 2019

Thanks @AndreMiras!!,
I think that we should have all the tests fully working or we could cause a mess without willing, that is why I labeled this as Critical (our CI tests depends on this), the other ones labeled can wait

@AndreMiras
Copy link
Member

I agree we should always keep the build green

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Priority: Critical This should be dealt with ASAP. Not fixing this issue would be a serious error.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants