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

Add support for python 3.12 #54

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

svenevs
Copy link

@svenevs svenevs commented Mar 1, 2024

  • Replace assertEquals (deprecated) with assertEqual.
  • Replace self.assert_ with self.assertTrue.
  • Fix docstrings in cpplint.py that contain invalid escape sequences to be raw strings.

This change is Reviewable

- Replace `assertEquals` (deprecated) with `assertEqual`.
- Replace `self.assert_` with `self.assertTrue`.
- Fix docstrings in `cpplint.py` that contain invalid escape
  sequences to be raw strings.
Copy link
Author

@svenevs svenevs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: 1 unresolved discussion, needs platform reviewer assigned, needs at least two assigned reviewers (waiting on @svenevs)


cpplint/cpplint.py line 1115 at r1 (raw file):

  def RepositoryName(self):
    r"""FullName after removing the local path to the repository.

FYI this gets done because otherwise cpplint's internal tests fail talking about invalid escape sequences. The other solution is to turn \. into \\. and \D into \\D. doesn't seem to really matter...


cpplint/cpplint_unittest.py line 128 at r1 (raw file):

  # Perform lint on single line of input and return the error message.
  def PerformSingleLineLint(self, code):
    error_collector = ErrorCollector(self.assertTrue)

working, we need this job from RobotLocomotion/drake#21013 to pass in order to confirm.

There is one expected failure, unrelated to the changes here, compare to the previous launch

[2:23:39 PM]  //tools/jupyter:py/jupyter_notebook_test                                 FAILED in 0.3s
[2:23:39 PM]    /Users/admin/workspace/mac-arm-ventura-unprovisioned-clang-bazel-experimental-release/_bazel_admin/4c3a1e08493e1ec72f883b9e38f87cf5/execroot/drake/bazel-out/darwin_arm64-opt/testlogs/tools/jupyter/py/jupyter_notebook_test/test.log
[2:23:39 PM]  //tools/workspace/styleguide:cpplint_unittest                            FAILED in 1.1s
[2:23:39 PM]    /Users/admin/workspace/mac-arm-ventura-unprovisioned-clang-bazel-experimental-release/_bazel_admin/4c3a1e08493e1ec72f883b9e38f87cf5/execroot/drake/bazel-out/darwin_arm64-opt/testlogs/tools/workspace/styleguide/cpplint_unittest/test.log

If //tools/workspace/styleguide:cpplint_unittest works correctly then we are good to merge this.

Copy link

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the 3.12 smoke test build passes, then we should land this and bump Drake to use it (separately from the 3.12 upgrade PR).

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: 1 unresolved discussion, LGTM missing from assignee jwnimmer-tri(platform), needs at least two assigned reviewers (waiting on @svenevs)

@jwnimmer-tri
Copy link

jwnimmer-tri commented Mar 1, 2024

:lgtm:

Copy link
Author

@svenevs svenevs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: needs at least two assigned reviewers (waiting on @svenevs)


cpplint/cpplint_unittest.py line 128 at r1 (raw file):

Previously, svenevs (Stephen McDowell) wrote…

working, we need this job from RobotLocomotion/drake#21013 to pass in order to confirm.

There is one expected failure, unrelated to the changes here, compare to the previous launch

[2:23:39 PM]  //tools/jupyter:py/jupyter_notebook_test                                 FAILED in 0.3s
[2:23:39 PM]    /Users/admin/workspace/mac-arm-ventura-unprovisioned-clang-bazel-experimental-release/_bazel_admin/4c3a1e08493e1ec72f883b9e38f87cf5/execroot/drake/bazel-out/darwin_arm64-opt/testlogs/tools/jupyter/py/jupyter_notebook_test/test.log
[2:23:39 PM]  //tools/workspace/styleguide:cpplint_unittest                            FAILED in 1.1s
[2:23:39 PM]    /Users/admin/workspace/mac-arm-ventura-unprovisioned-clang-bazel-experimental-release/_bazel_admin/4c3a1e08493e1ec72f883b9e38f87cf5/execroot/drake/bazel-out/darwin_arm64-opt/testlogs/tools/workspace/styleguide/cpplint_unittest/test.log

If //tools/workspace/styleguide:cpplint_unittest works correctly then we are good to merge this.

done

[3:55:50 PM]  //tools/workspace/styleguide:cpplint_unittest                            PASSED in 1.4s

@svenevs
Copy link
Author

svenevs commented Mar 1, 2024

Looks like we need either a platform stamp or a forceful hand 😉

@jwnimmer-tri jwnimmer-tri merged commit b474ba1 into RobotLocomotion:main Mar 1, 2024
1 check passed
@svenevs svenevs deleted the fix/python3.12 branch March 1, 2024 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants