openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #05070
Re: OCA guidelines for code compatibility with Python 2.6
On 24/02/2014 17:00, Daniel Reis wrote:
>
> Hi all,
>
> In a merge proposal for 7.0. came up the question of what Python
> versions should the code be compatible with.
>
> In particular, a dictionay comprehension is used the, available in
> Python 2.7 but not compatible with Python 2.6.
> For reference, the MP is:
> https://code.launchpad.net/~dreis-pt/project-service/7.0-issue_task-dr/+merge/195985
>
> So, the question here is:
> Regarding OCA reviewed modules, should the code targeting OpenERP >=
> 7.0 be made to keep Python 2.6 compatibility?
>
> Regards
>
> Daniel Reis
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help : https://help.launchpad.net/ListHelp
I'm not sure OpenERP 7 can run on Python 2.6 (but I could well be deeply
mistaken).
I really wish we could mandate targetting Python 2.7 for OCA modules and
take advantage of the additions brought by that release. It is nowadays
fairly easy to get a python2.7 interpreter even if your distro does not
provide one (virtualenv). We should also gently nag people about using
the __future__ imports designed to ease porting to Python 3.x. The
idea behind this is not to block useful modules but to start getting
contributors in the mood for the change. This will save grief later.
--
Alexandre Fayolle
Chef de Projet
Tel : + 33 (0)4 79 26 57 94
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac Cedex
http://www.camptocamp.com
Follow ups
References