Custom pylint checkers for Python 2/3 compatibility
Hello Brett. At a quick glance, the patch looks really good, even with the scarce documentation that we have. :-) Maybe you can turn this into a pull request for Pylint, so that we may have in the near future a mode that only checks Python 2/3 compatibility? That way would be easier for review, too. Thank you.
Sure. I will try to make time next week to make a pull request against Pylint with a checkers/python3.py or something. On Fri Jul 25 2014 at 6:14:21 PM Claudiu Popa <pcmanticore@gmail.com> wrote:
Hello Brett.
At a quick glance, the patch looks really good, even with the scarce documentation that we have. :-) Maybe you can turn this into a pull request for Pylint, so that we may have in the near future a mode that only checks Python 2/3 compatibility? That way would be easier for review, too.
Thank you.
I've started work on a pull request to add my Python 3 checkers into Pylint: https://bitbucket.org/brettsky/pylint . The work isn't quite done, but I have run into one issue where one of my checker is causing various regression tests to fail across the board due to strings not being specified as either unicode or bytes. Is there an easy way to make a checker opt-in instead of opt-out by default? Or should I go through and fix all the strings in Pylint (probably through `from __future__ import unicode`)? On Sat Jul 26 2014 at 10:58:57 AM Brett Cannon <bcannon@gmail.com> wrote:
Sure. I will try to make time next week to make a pull request against Pylint with a checkers/python3.py or something.
On Fri Jul 25 2014 at 6:14:21 PM Claudiu Popa <pcmanticore@gmail.com> wrote:
Hello Brett.
At a quick glance, the patch looks really good, even with the scarce documentation that we have. :-) Maybe you can turn this into a pull request for Pylint, so that we may have in the near future a mode that only checks Python 2/3 compatibility? That way would be easier for review, too.
Thank you.
On Fri Aug 08 2014 at 2:01:18 PM Brett Cannon <bcannon@gmail.com> wrote:
I've started work on a pull request to add my Python 3 checkers into Pylint: https://bitbucket.org/brettsky/pylint . The work isn't quite done, but I have run into one issue where one of my checker is causing various regression tests to fail across the board due to strings not being specified as either unicode or bytes. Is there an easy way to make a checker opt-in instead of opt-out by default? Or should I go through and fix all the strings in Pylint (probably through `from __future__ import unicode`)?
I just realized I should have checked setup.py to see if 2to3 was being used, which it is. =) So it seems that I will have to port Pylint over to a Python 2/3 source-compatible code base in order to pass any checks with my set of checkers against Pylint itself. Is that okay? And if so what Python version support is required (Tox file suggests 2.7, 3.2-3.4)?
On Sat Jul 26 2014 at 10:58:57 AM Brett Cannon <bcannon@gmail.com> wrote:
Sure. I will try to make time next week to make a pull request against Pylint with a checkers/python3.py or something.
On Fri Jul 25 2014 at 6:14:21 PM Claudiu Popa <pcmanticore@gmail.com> wrote:
Hello Brett.
At a quick glance, the patch looks really good, even with the scarce documentation that we have. :-) Maybe you can turn this into a pull request for Pylint, so that we may have in the near future a mode that only checks Python 2/3 compatibility? That way would be easier for review, too.
Thank you.
On Fri, Aug 8, 2014 at 9:09 PM, Brett Cannon <bcannon@gmail.com> wrote:
I just realized I should have checked setup.py to see if 2to3 was being used, which it is. =) So it seems that I will have to port Pylint over to a Python 2/3 source-compatible code base in order to pass any checks with my set of checkers against Pylint itself. Is that okay? And if so what Python version support is required (Tox file suggests 2.7, 3.2-3.4)?
Right now, Pylint 1.3 is the last version which supports 2.5 and 2.6 and starting with Pylint 1.4, which will be released really soon, it will support only 2.7-3.4. So having a Python 2/3 source-compatible base is the way to go for the near future. I believe we'll drop 2to3 as well. A pull request for this will be appreciated. :-)
On Fri Aug 08 2014 at 2:59:04 PM Claudiu Popa <pcmanticore@gmail.com> wrote:
On Fri, Aug 8, 2014 at 9:09 PM, Brett Cannon <bcannon@gmail.com> wrote:
I just realized I should have checked setup.py to see if 2to3 was being used, which it is. =) So it seems that I will have to port Pylint over
to a
Python 2/3 source-compatible code base in order to pass any checks with my set of checkers against Pylint itself. Is that okay? And if so what Python version support is required (Tox file suggests 2.7, 3.2-3.4)?
Right now, Pylint 1.3 is the last version which supports 2.5 and 2.6 and starting with Pylint 1.4, which will be released really soon, it will support only 2.7-3.4. So having a Python 2/3 source-compatible base is the way to go for the near future. I believe we'll drop 2to3 as well. A pull request for this will be appreciated. :-)
Any issue if I just make it part of my Python 3 checker pull request? It's obviously easier when I have my own checkers to make sure I'm not screwing it up. =)
On Fri, Aug 8, 2014 at 10:20 PM, Brett Cannon <bcannon@gmail.com> wrote:
Any issue if I just make it part of my Python 3 checker pull request? It's obviously easier when I have my own checkers to make sure I'm not screwing it up. =)
Nope, it's fine with me if it'll be in your Python 3 checker pull request.
participants (2)
-
Brett Cannon
-
Claudiu Popa