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

Catch all of the spurious warnings from get_event_loop. #94

Merged
merged 1 commit into from
Jul 22, 2023

Conversation

clalancette
Copy link
Contributor

The previous patch that did this only did it for one of the cases, but we actually need to catch this warning for all cases of get_event_loop(). Do that here by wrapping the entire block in catch_warnings(). With this in place, other spurious warnings from downstream packages (like launch) are also quieted.

@cottsay @Voldivh FYI

The previous patch that did this only did it for one of
the cases, but we actually need to catch this warning for
all cases of get_event_loop().  Do that here by wrapping
the entire block in catch_warnings().  With this in
place, other spurious warnings from downstream packages
(like launch) are also quieted.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
@clalancette
Copy link
Contributor Author

clalancette commented Jul 12, 2023

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

Copy link

@Voldivh Voldivh left a comment

Choose a reason for hiding this comment

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

LGTM!
QQ: I believe this would quiet all the warnings in any case this method is used. From what I recall other packages like launch used this implementation and also created their own methods that uses get_event_loop(), the warnings that comes from those methods should still be appearing right?

@clalancette
Copy link
Contributor Author

QQ: I believe this would quiet all the warnings in any case this method is used. From what I recall other packages like launch used this implementation and also created their own methods that uses get_event_loop(), the warnings that comes from those methods should still be appearing right?

Yes, that's exactly right. There are still warnings coming from launch from its own uses of get_event_loop, but with this in place there are no warnings that come from osrf_pycommon anymore.

@clalancette clalancette merged commit 945c866 into master Jul 22, 2023
13 checks passed
@clalancette clalancette deleted the clalancette/further-fix-get-event-loop branch July 22, 2023 13:23
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.

3 participants