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

Deprecation warning on Iron Tutorial Party: TypeCollectorDecorator SuppressTypeConversions #554

Closed
SteveMacenski opened this issue May 3, 2023 · 14 comments

Comments

@SteveMacenski
Copy link

SteveMacenski commented May 3, 2023

/usr/lib/python3/dist-packages/colcon_core/argument_parser/type_collector.py:9: UserWarning: 'colcon_core.argument_parser.type_collector.TypeCollectorDecorator' has been deprecated
  class TypeCollectorDecorator(ArgumentParserDecorator):
/usr/lib/python3/dist-packages/colcon_core/argument_parser/type_collector.py:62: UserWarning: 'colcon_core.argument_parser.type_collector.SuppressTypeConversions' has been deprecated, use 'colcon_core.argument_parser.action_collector.SuppressTypeConversions' instead

First output when building a clean workspace containing Nav2 (but I suspect any)

@vinnnyr
Copy link

vinnnyr commented May 3, 2023

I can report that I get this warning as well on my machine when invoking colcon

@cottsay
Copy link
Member

cottsay commented May 3, 2023

I need more information. Is there more of this backtrace that you omitted?

@vinnnyr
Copy link

vinnnyr commented May 3, 2023

no more to this backtrace, but this is what I get

colcon build --packages-select my_package
/usr/lib/python3/dist-packages/colcon_core/argument_parser/type_collector.py:9: UserWarning: 'colcon_core.argument_parser.type_collector.TypeCollectorDecorator' has been deprecated
  class TypeCollectorDecorator(ArgumentParserDecorator):
/usr/lib/python3/dist-packages/colcon_core/argument_parser/type_collector.py:62: UserWarning: 'colcon_core.argument_parser.type_collector.SuppressTypeConversions' has been deprecated, use 'colcon_core.argument_parser.action_collector.SuppressTypeConversions' instead
  class SuppressTypeConversions:

@SteveMacenski
Copy link
Author

SteveMacenski commented May 3, 2023

That's all I get

steve@mo:~/Documents/hi_ws$ colcon build --parallel-workers 3
/usr/lib/python3/dist-packages/colcon_core/argument_parser/type_collector.py:9: UserWarning: 'colcon_core.argument_parser.type_collector.TypeCollectorDecorator' has been deprecated
  class TypeCollectorDecorator(ArgumentParserDecorator):
/usr/lib/python3/dist-packages/colcon_core/argument_parser/type_collector.py:62: UserWarning: 'colcon_core.argument_parser.type_collector.SuppressTypeConversions' has been deprecated, use 'colcon_core.argument_parser.action_collector.SuppressTypeConversions' instead
  class SuppressTypeConversions:
Starting >>> nav2_common
Starting >>> nav_2d_msgs
Finished <<< nav2_common [0.91s]                                                               
Starting >>> nav2_msgs
Starting >>> nav2_voxel_grid
Finished <<< nav2_voxel_grid [0.52s]                                                            
Finished <<< nav_2d_msgs [1.61s]                 
And so on

@cottsay
Copy link
Member

cottsay commented May 3, 2023

The only way I can see this happening is that you've updated colcon-core but not colcon-defaults or colcon-mixin.

The current versions:

  • colcon-defaults: 0.2.8
  • colcon-mixin: 0.2.3

Can you check your package versions? How did you install colcon?

You can also run colcon version-check to check all of your colcon extension versions at once.

@SteveMacenski
Copy link
Author

Installed via normal install instructions for installing ROS distributions. I dog food the basic install instructions to make sure whatever end-users of Nav2 see is also what I see. If there's something more that needs to be put in the iron documentation so that this isn't an issue, that may be a good idea. I followed the instructions verbatim

steve@mo:~/Documents/navigation2_ws$ colcon version-check
/usr/lib/python3/dist-packages/colcon_core/argument_parser/type_collector.py:9: UserWarning: 'colcon_core.argument_parser.type_collector.TypeCollectorDecorator' has been deprecated
  class TypeCollectorDecorator(ArgumentParserDecorator):
/usr/lib/python3/dist-packages/colcon_core/argument_parser/type_collector.py:62: UserWarning: 'colcon_core.argument_parser.type_collector.SuppressTypeConversions' has been deprecated, use 'colcon_core.argument_parser.action_collector.SuppressTypeConversions' instead
  class SuppressTypeConversions:
colcon-argcomplete 0.3.3: up-to-date
colcon-bash 0.4.2: up-to-date
colcon-cd 0.1.1: up-to-date
colcon-cmake 0.2.27: up-to-date
colcon-core 0.12.1: up-to-date
colcon-defaults 0.2.8: up-to-date
colcon-devtools 0.2.3: up-to-date
colcon-installed-package-information 0.1.0: up-to-date
colcon-library-path 0.2.1: up-to-date
colcon-metadata 0.2.5: up-to-date
colcon-mixin 0.2.2: newer version available (0.2.3)
colcon-notification 0.2.15: up-to-date
colcon-output 0.2.13: up-to-date
colcon-override-check 0.0.1: up-to-date
colcon-package-information 0.3.3: up-to-date
colcon-package-selection 0.2.10: up-to-date
colcon-parallel-executor 0.2.4: up-to-date
colcon-pkg-config 0.1.0: up-to-date
colcon-powershell 0.3.7: up-to-date
colcon-python-setup-py 0.2.8: up-to-date
colcon-recursive-crawl 0.2.1: up-to-date
colcon-ros 0.3.23: up-to-date
colcon-test-result 0.3.8: up-to-date
colcon-zsh 0.4.0: up-to-date

@cottsay
Copy link
Member

cottsay commented May 3, 2023

Is this a brand new install? Can you apt update && apt upgrade to get the new packages?

@SteveMacenski
Copy link
Author

Yes, I did that as part of the instructions and tried again, it didn't report anything that needed updates (including colcon, even though above it says colcon-mixin 0.2.2: newer version available (0.2.3)).

@cottsay
Copy link
Member

cottsay commented May 4, 2023

I still can't reproduce this. The installation instructions don't mention installing python3-colcon-mixin, so this must not be a "fresh" installation of Jammy. Even more confusing is that the package is available up-to-date for Jammy on packages.ros.org. Are you mixing pip packages with apt?

What do these look like?

$ dpkg-query -s python3-colcon-mixin
$ python3 -c "import colcon_mixin; print(colcon_mixin.__path__)"

@SteveMacenski
Copy link
Author

SteveMacenski commented May 4, 2023

That is true, this is not fresh, this is my existing machine on bare metal (I also wanted to test if Iron had collisions between Rolling / Humble side by side, and very happy to see everything working well)

steve@mo:~/Documents/navigation2_ws$ dpkg-query -s python3-colcon-mixin
dpkg-query: package 'python3-colcon-mixin' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.

steve@mo:~/Documents/navigation2_ws$ python3 -c "import colcon_mixin; print(colcon_mixin.__path__)"
['/home/steve/.local/lib/python3.10/site-packages/colcon_mixin']
steve@mo:~/Documents/navigation2_ws$ 

@cottsay
Copy link
Member

cottsay commented May 4, 2023

Thanks for the context.

You've installed colcon_mixin using pip into your user's home directory, so apt/dpkg isn't aware of it or responsible for updating it. You should use pip install -U colcon_mixin to regularly update that package and any other packages you've installed using pip.

Alternatively, just use the debs so they're updated with the other packages on your system. pip uninstall colcon_mixin && apt install python3-colcon-mixin should do the trick, but again, there may be other packages installed via pip which are out of date.

In any case, this deprecation is working as intended. The deprecated classes will be removed someday, but clearly there are systems in the wild which would be broken if were to remove them now, so we'll need to wait a while longer.

@cottsay
Copy link
Member

cottsay commented May 4, 2023

For further context, the deprecation was introduced in #477 and released in colcon-core 1.12.0 on February 1st, 2023.

@SteveMacenski
Copy link
Author

That indeed fixed it. I'm not 100% sure how I got that mixed up, thanks! I don't think this needs to stay open then (@vinnnyr any objections?)

@vinnnyr
Copy link

vinnnyr commented May 4, 2023

nope no objections! resolution makes sense. I just wanted to chime in and say "me too" :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants