← Back to team overview

openerp-expert-framework team mailing list archive

Re: Dependency of current trunk on requests

 

Hi Olivier,

On 08/02/2013 03:09 PM, Olivier Dony wrote:
>
>> as one of our users noticed, a dependency to 'requests' has been
>> recently added to the current trunk of OpenERP
>> Without it, the web module does not load.
>>
>> (for ref: https://bugs.launchpad.net/anybox.recipe.openerp/+bug/1205920)
>>
>> Is there a reason not to add it to setup.py in the same way gevent has
>> been added earlier ?
>
> Actually yes, we generally tend to avoid using the `requests` module
> as it was only added recently in Debian (stable), and we never need
> anything that the standard urllib/urllib2 cannot do.
>
> So we've dropped that `requests` use in trunk rather than adding it to
> setup.py: addons rev.8842 rev-id:
> dle@xxxxxxxxxxx-20130802130349-206ms4c5s5dnzbti
and our builds are green again for openerp-trunk, without requiring an
explicit 'requests' egg in configuration,

>
> Thanks for the heads up!
You're welcome, and thank you for the quick workaround.

There was an interesting side-discussion on the above mentioned ticket,
about 'external' module dependencies, such as:

    'external_dependencies' : {
        'python' : ['ldap'],

For a while, I thought that an automatic install tool (such as the
buildout recipe) could install those dependencies, but these are not
distribution names (as in "pip install python-ldap"), but package names
(as in "import ldap").

Do you have any plans to declare python requirements in __openerp__.py ?

It seems that currently all these external dependencies do is some (very
useful) checking that the module is indeed installable. Quoting Florent:

" [the external dependency declaration] avoids a user installing a
module and the server crashing because of a missing import... this is a
life saver and I for one systematically take care to add my deps in this
fashion to avoid issues."

Regards,



 





-- 
Georges Racinet
Anybox SAS, http://anybox.fr
Bureau: 09 72 39 50 97 / 09 72 39 13 06
Portable: 06 51 32 07 27
GPG: 0x33AB0A35, sur serveurs publics



References