Showing content from http://mail.python.org/pipermail/python-dev/attachments/20140607/78b43dd1/attachment.html below:
<br><br><div>On Sat Jun 07 2014 at 9:11:54 AM, Claudiu Popa <<a href="mailto:pcmanticore@gmail.com">pcmanticore@gmail.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Fri, Jun 6, 2014 at 7:37 PM, Brett Cannon <<a href="mailto:bcannon@gmail.com" target="_blank">bcannon@gmail.com</a>> wrote:<br>
> After Glyph and Alex's email about their asks for assisting in writing<br>
> Python 2/3 code, it got me thinking about where in the toolchain various<br>
> warnings and such should go in order to help direct energy to help develop<br>
> whatever future toolchain to assist in porting.<br>
><br>
> There seems to be three places where issues are/can be caught once a project<br>
> has embarked down the road of 2/3 source compatibility:<br>
><br>
> -3 warnings<br>
> Some linter tool<br>
<br>
<br>
Pylint could help here. We already have a couple of checks which<br>
addresses the issue of porting between Python 2 and 3, checks like:<br>
<br>
raising-string<br>
old-style-class<br>
slots-on-old-class<br>
super-on-old-class<br>
old-raise-syntax<br>
old-ne-operator<br>
lowercase-l-suffix<br>
backtick<br>
unpacking-in-except<br>
indexing-exception<br>
property-on-old-class<br>
<br>
There was an idea on Pylint's bugtracker to implement a plugin for<br>
Python 2, with warnings dedicated to porting and this solution seems<br>
easier than the alternatives.<br></blockquote><div><br></div><div>Yes, pylint is definitely an option. I have not looked at how hard it would be to write the rules, though, and how easy it would be to run with just those rules (if I remember correctly pylint can take a config, but I have not run it manually in a while).</div>
<div><br></div><div>Having something which walked the 2.7 CST or AST wouldn't be difficult to write either, so it's just a matter of balance of work required.</div>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4