Dependency of current trunk on requests

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Dependency of current trunk on requests

Georges Racinet
Hi all,

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 ?
Maybe because it occurs in the google_spr
This'd make any automatic install system (including but not limited to
the buildout recipe) work right away without any change in configuration.
I do realize that dependency is in the google_spreadsheet module only,
does it really matter ?

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


_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-framework
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Dependency of current trunk on requests

Olivier Dony (OpenERP)
On 08/01/2013 11:35 AM, Georges Racinet wrote:
> Hi all,

Hi Georges,

> 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: [hidden email]-20130802130349-206ms4c5s5dnzbti

Thanks for the heads up!

_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-framework
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Dependency of current trunk on requests

Georges Racinet
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:
> [hidden email]-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


_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-framework
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help   : https://help.launchpad.net/ListHelp
Loading...