ros-infrastructure / roswiki

Plugins and configurations for wiki.ros.org
wiki.ros.org
24 stars 19 forks source link

Question: guidelines on python3 compatible documentation on ros wiki #339

Closed SubaruArai closed 2 years ago

SubaruArai commented 2 years ago

The Problem

Currently, there are quite a lot of wiki pages written with only python2 in mind. e.g. actionlib_tutorials's sample code, first shebang is usr/bin/env python

On the other hand, the last distro supporting python2 will be EOL next year (Melodic, 2023), and cpython's python2 is officially EOL.

I wanted to add more documentation to sample codes (namely type hints), but I'm not sure if using python3 grammar is OK.

The Question

Should we stick to python2 style until Melodic's EOL, or just move on to python3?

tfoote commented 2 years ago

If you're doing something Python 2 versus Python3 specific you can use the Version macros to show a version for noetic vs melodic and assume the right version of python. https://wiki.ros.org/WikiMacros#Version

SubaruArai commented 2 years ago

Ok, thanks for the patience!