launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #04747
Re: PLEASE ... DO ... NOT .... USE ... PYTHON2.6 FEATURES
On 09/23/2010 04:43 AM, Robert Collins wrote:
> That is all.
>
> (third break in a row in production-devel due to 2.6 only changes).
>
> We're not migrated, we're not done, until we're done and /all/
> builders, and /all/ deployment targets are migrated to 2.6.
>
> -frustratedly-yrs,
> Rob
>
It is possible to use pyflakes to catch these errors before they are submitted:
$ bzr diff -r submit: | lsdiff -i '*py' \
> | xargs python2.5 /usr/bin/pyflakes | grep invalid
I got the following output:
lib/canonical/launchpad/browser/tests/test_launchpad.py:202: Warning: 'with'
will become a reserved keyword in Python 2.6
lib/canonical/launchpad/browser/tests/test_launchpad.py:202: invalid syntax
with person_logged_in(registrant):
^
I also tried pocketlint, pylint, and pychecker, but I could not get them to give
a clean output with just compilation errors.
I know this is not the solution you want to see, but it is a start for a workaround.
--
Māris Fogels -- https://launchpad.net/~mars
Launchpad.net -- cross-project collaboration and hosting
Attachment:
signature.asc
Description: OpenPGP digital signature
Follow ups
References