[Scons-dev] SCons and octal constants
Bill Deegan
bill at baddogconsulting.com
Tue Apr 29 18:33:15 EDT 2014
All,
If someone can point me to a pylint command line which should work for
scons repo, I can add it to buildbot.
-Bill
On Mon, Apr 28, 2014 at 9:04 AM, Dirk Bächle <tshortik at gmx.de> wrote:
> Hi,
>
>
> On 28.04.2014 09:19, anatoly techtonik wrote:
>
>> On Mon, Apr 28, 2014 at 8:48 AM, Russel Winder <russel at winder.org.uk>
>> wrote:
>>
>>> Since the floor version of SCons is now Python 2.7, we should dispense
>>> with the horror that is 1970s C-style octal constants and use the 0o
>>> form (*). This applies to the default/default branch just as much to the
>>> default/python3-port branch (where it is needed for SCons to run at all
>>> on Python 3).
>>>
>>> If making this change is agreed then I guess there needs to be a single
>>> changeset alteration proposed to both branches. I am assuming we do this
>>> on one branch and then cherry-pick into the other. This would imply
>>> doing it for the default/default branch and then cherry-picking into
>>> default/python3-port.
>>>
>>> Thanks.
>>>
>>> (*) The 0o form works in Python 2.6 as well.
>>>
>> Let me sum this up. To make SCons codebase more 2/3 compatible, we
>> need to use 0o777 instead of 0777.
>>
>> +1
>>
>> Do you need help preparing PR?
>> BTW, does anybody know a tool to grep Python AST for that?
>> Maybe pylint with a single rule can do all the job automatically?
>> Would be nice to see the command here for reference.
>>
>
> some while ago I had filed the issue
>
> https://bitbucket.org/logilab/astroid/issue/17/typeerror-
> due-to-definition-of-__call__
>
> , which seems to be resolved now in "astroid". I didn't have any time to
> try it out yet, but this should open the door to running the whole codebase
> through "pylint"...and also "pyreverse" for creating UML diagrams of
> classes automatically. Yummy...
>
> So pylint/astroid might indeed help with detecting all occurrences of
> octal constants.
>
> Best regards,
>
> Dirk
>
>
> _______________________________________________
> Scons-dev mailing list
> Scons-dev at scons.org
> http://two.pairlist.net/mailman/listinfo/scons-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20140429/df6bbc26/attachment.html>
More information about the Scons-dev
mailing list