-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
Use Python 3 everywhere #12809
Use Python 3 everywhere #12809
Conversation
At least 6 Python 3 syntax errors to cleanup... $ flake8 . --count --select=E9,F63,F7,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.
|
The current linting for the stuff I've touched with testing was done with yapf. We've never created a standard here for linting in python as we have with astyle. Some of these things are part of the ROS integration tests which will stay at 2.7. This explains the So, I'm not sure how to review this. Are we to fix all this or just review the current stage as a step in the direction given by the title of the PR? |
75 days until Python 2 end of life. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this by simply running make
from a clean pull. With Python 3.5, this worked after installing some dependencies. For reference I needed: pip3 install --user jinja2 catkin_pkg numpy toml pyyaml
@cclauss Can you open an issue with your comments here. I don't think they fall in line with what the purpose of this PR was -- python 3 for the build process -- and I don't want to drag it down. |
Agreed. Conflicts must be resolved and tests must pass. |
4edecd0
to
4eaa675
Compare
4eaa675
to
50ffc46
Compare
I am not sure what's happening but I am totally confident that |
In several of these files we need to make the same text change numerous times. Would it be possible instead to define a variable that can be reused multiple times so that future modifications are simpler to make and to review? |
Are you referring to the container tags? The thing about it is that it's not mandatory that we update all the containers tag at the same time. There could even be situations where that doesn't happen. |
|
@cclauss what's your point here? The containers were updated: https://github.com/PX4/containers/blob/master/docker/Dockerfile_base-bionic#L60-L63 |
Looks like we missed Python3 in the first place: PX4/PX4-containers#211 |
@julianoes Good call. Well I never checked anything Python 3 for the Windows toolchain because at the time it was completely unsupported by the build. Now I could change the toolchain installation procedure to only include 3. |
@julianoes we have another issue here: |
Actually, we have already Python 3 compatibility added here: PX4/genmsg@1ad8e13. This just needs to get it and we should update both |
@julianoes I found the necessary Cygwin toolchain changes locally and it builds this pr fine. I can create a pr on the toolchain repository and let CI generate a new toolchain installer soon. I'm assuming that I need to keep backward compatibility and leave python 2 working like before as well. |
721917c
to
00bce6c
Compare
00bce6c
to
0442295
Compare
I
@julianoes I would say the Windows Toolchain/CI is ready (first) 😉 |
Since Python 2 is retired in 4 months, we should move everything to 3.
for Python 3 support.
0442295
to
89f39b3
Compare
Since Python 2 is retired in 4 months, we should move everything to 3.
Closes #12788.
@MaEtUgR do you mind checking appveyor? 😄