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

Hide confusing warning message from setuptools #140

Closed
AAlon opened this issue Mar 2, 2020 · 3 comments
Closed

Hide confusing warning message from setuptools #140

AAlon opened this issue Mar 2, 2020 · 3 comments
Labels
question Further information is requested

Comments

@AAlon
Copy link

AAlon commented Mar 2, 2020

As a result of #127 an incompatible version of setuptools will not be installed. We need a way to hide the irrelevant warning:

You are running Setuptools on Python 2, which is no longer
supported and
>>> SETUPTOOLS WILL STOP WORKING <<<
in a subsequent release (no sooner than 2020-04-20).

Not sure the solution would be in colcon-bundle but perhaps it's possible for colcon-bundle to change the warning configuration when it prepares the bundle with setuptools.
Refer to internal issue B9SIM-1008.

@AAlon AAlon changed the title Hide confusing warning error message from setuptools Hide confusing warning message from setuptools Mar 2, 2020
@piraka9011 piraka9011 added enhancement New feature or request question Further information is requested and removed enhancement New feature or request labels Mar 2, 2020
@piraka9011
Copy link
Collaborator

piraka9011 commented Mar 2, 2020

@AAlon this is related to setuptool and not to colcon-bundle.
Since the fix is in, I think what needs to happen instead is a version bump and customers should update their colcon-bundle install.

Looking into it a bit though, I see that specifying setuptools<45 instead of setuptools==44 might work and/or adding:

import warnings
warnings.filterwarnings("ignore")

to setup.py is one way to suppress warnings.

@AAlon
Copy link
Author

AAlon commented Mar 2, 2020

re: not related to colcon-bundle - setuptools might not be a dependency of the customer's application. It's a dependency of pip, which is a dependency of colcon-bundle. So when customers bundle their ROS1 application, even if it has no use of setuptools - it will be bundled with Python2.x + setuptools (with the version that colcon-bundle decided). The customer has no control over that, which is why I thought that exploring a solution on colcon-bundle's side is worth looking into.

Colcon-bundle could do something (rather ugly) like patch the warning message string of the setuptools installation in the bundle to be empty, or be less scary ;) Or, patch the default warning config to filter out that particular warning. Hopefully there are more elegant solutions out there.

@piraka9011
Copy link
Collaborator

piraka9011 commented Mar 3, 2020

I wasn't able to reproduce locally and I don't think it's wise to suppress warnings.
I'd either have to suppress all the warnings with the -W ignore flag or add a context manager to suppress the warnings whose blast radius might be a bit too wide.

I think the solution is to release colcon-bundle 0.0.19 with the latest changes which pin the setuptools version (As suggested by the official docs).
If you have any other suggestions feel free to re-open this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

2 participants