From: Carlos P. <cpa...@ce...> - 2016-03-09 10:43:10
|
Hi, I have an objection against this patch: We have 3 cases here: a) python<2.7 and ordereddict module installed (e.g. from pypi) b) python<2.7 and ordereddict module not installed ==> use local copy c) python==2.7 (ordereddict comes from collections) The original code worked for a) and b) but not for c) (which it treated as if it was b) With your patch, it would work for b) and c) but not for a) (which it would be treated as b) ) The proper solution should try the collections.ordereddict, then ordereddict and only then revert to the local copy. BUT: I understand that this is only a problem if the local copy of ordereddict is removed (as done for the debian packages) but not if installed from the "official" sources (since in practice, falling back to the local copy is ok). So I wonder if it may make more sense to just apply your patch as part of the packaging of taurus3.7 **for debian** instead of forcing a hotfix in the official package (which is not affected in practice). Specially considering that it would be a temporary workaround because with taurus4, python 2.6 is no longer supported so the taurus.external.ordereddict package can be deprecated What do you think? Carlos On Wed 9 March 2016 10:55:10 Picca Frédéric-Emmanuel wrote: > --- > lib/taurus/external/ordereddict/__init__.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/taurus/external/ordereddict/__init__.py > b/lib/taurus/external/ordereddict/__init__.py index caf0c37..d38bdce > 100644 > --- a/lib/taurus/external/ordereddict/__init__.py > +++ b/lib/taurus/external/ordereddict/__init__.py > @@ -27,7 +27,7 @@ from __future__ import absolute_import > > try: > # ordereddict from python 2.7 or from ordereddict installed > package? - from ordereddict import * > + from collections import OrderedDict > except ImportError: > # ordereddict from local import > import os > > ---------------------------------------------------------------------- > -------- Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140 > _______________________________________________ > Tauruslib-devel mailing list > Tau...@li... > https://lists.sourceforge.net/lists/listinfo/tauruslib-devel -- +----------------------------------------------------+ Carlos Pascual Izarra Scientific Software Coordinator Computing Division ALBA Synchrotron [http://www.albasynchrotron.es] Carrer de la Llum 2-26 E-08290 Cerdanyola del Valles (Barcelona), Spain E-mail: cpa...@ce... Phone: +34 93 592 4428 +----------------------------------------------------+ |