-
Notifications
You must be signed in to change notification settings - Fork 507
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
Python 3 compatibility issues #401
Comments
I've reviewed all of the CBOR script related warnings, they are all in Python 2 compatibility blocks. Do we need to scrub all Python 2 support? |
The linters will get confused by code that does not follow the Python porting best practice use feature detection instead of version detection so if you are sure that the F821 issues are all safe uses done via version detection then those issues can be ignored. The usual approaches are to add the six module and replace unicode with six.text_type or without six, to do it like: try:
long
unicode
except NameError: # Python 3
long = int
unicode = str |
Is anyone actively working on this? I'd like a version of rosbridge that is either bilingual or ported to Python 3. |
I've been using rosbridge with Python 3, but have not tested the latest release with it. It would be prudent to start running the tests in both 2 and 3. |
#420 runs basic linting on both Python 2 and Python 3. |
@mvollrath Great, thanks for the confirmation; I've done some basic testing under Python 3 on my system and it does indeed seem to be working well. |
* Travis CI: Look for Python syntax errors and undefined name _It would be prudent to start running the tests in both 2 and 3._ #401 (comment) * Add names to protect the guilty * Five jobs, not six * Identity is not the same thing as equality in Python * Flake8 tests now pass on Python 2
This issue has been marked as stale because it has been open for 180 days with no activity. Please remove the stale label or add a comment to keep it open. |
These issues continue to grow. #592 Demonstrates that we are now at 26 undefined names on Python 3. Does this codebase still need to support Python 2? It would be helpful if README.md stated what versions of Python are supported. |
ROS1 melodic requires Python 2 support until May 2023 and noetic requires Python 3 until May 2025. ROS2 branch does not require any Python 2 support. |
|
flake8 testing of https://github.com/RobotWebTools/rosbridge_suite on Python 3.7.1
$ flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics
E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety.
name
name
in__all__
The text was updated successfully, but these errors were encountered: