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

Python3000 #47

Closed
wants to merge 2 commits into from
Closed

Conversation

mattyclarkson
Copy link

Adds support for Python 3 by shimming changes in functionality between Python 2 and 3.

It also stops the compiled python files showing up in the git status list. This can be tested with:

[cpplint|python3000|✔] python2 cpplint/cpplint_unittest.py 
...........................................................................................................................................................................
----------------------------------------------------------------------
Ran 171 tests in 0.571s

OK
[cpplint|python3000|✔] python3 cpplint/cpplint_unittest.py 
cpplint/cpplint_unittest.py:4713: DeprecationWarning: Please use assertEqual instead.
  self.PerformFunctionLengthsCheck(code))
.cpplint/cpplint_unittest.py:83: DeprecationWarning: Please use assertTrue instead.
  ' which is not in _ERROR_CATEGORIES' % (message, category))
..........................................................................................................................................................................
----------------------------------------------------------------------
Ran 171 tests in 0.641s

OK
[cpplint|python3000|✔] python2 --version
Python 2.7.10
[cpplint|python3000|✔] python3 --version
Python 3.4.3

@mattyclarkson
Copy link
Author

I have a patch for the Python 3 unit test deprecation warnings but it is a huge patch because it requires that a lot of the assertEquals to be changed to assertEqual. I'll submit it if there is interest if this branch gets merged.

@dirk-thomas
Copy link
Contributor

Is this PR being considered for merging? Or does it need any updates? Python 3 support would be really valuable and should be difficult to reach. I would be more then happy to help.

@mattyclarkson
Copy link
Author

@dirk-thomas it's read to go. We use it everyday in production on Arch Linux Python 3.5 and have done since python 3.2.

@dirk-thomas
Copy link
Contributor

We are also using the patched version of it for over a month now: ament/ament_lint@7f2af60#diff-b5c57d8cc3ce83e990089f94f5ab6e15

Hopefully somebody will merge this as well as some of the other pending PRs at some point...

@tkruse
Copy link

tkruse commented Apr 23, 2016

Hi, I had extracted cpplint into an own github repo back when the google styleguide was in googlecode svn. Here: https://github.com/cpplint/cpplint
I have additionally made it available at pypi:
https://pypi.python.org/pypi/cpplint

@vapier
Copy link
Member

vapier commented Jan 17, 2025

thank you for your contribution, but public cpplint development in this repository has been halted (see #837). please migrate to https://github.com/cpplint/cpplint now.

@vapier vapier closed this Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants