2011-05-17 19:32:23 Markos Chandras napisaƂ(a): > On Tue, May 17, 2011 at 01:11:57PM -0400, Mark Loeser wrote: > > Arfrever Frehtes Taifersar Arahesis said: > > > PyXML is dead: > > > http://mail.python.org/pipermail/xml-sig/2004-November/010735.html > > > http://mail.python.org/pipermail/xml-sig/2006-June/011545.html > > > > > > PyXML provides _xmlplus module, which replaces xml module (from standard library) at run time, > > > which might result in various problems. > > > > > > I'm planning to implement the following solution: > > > - Python >=2.7.1-r2:2.7 will provide xml.use_pyxml() function. Calling of this function will be > > > necessary to use replace xml module with _xmlplus module. Python >=2.7.1-r2:2.7 will be added > > > to the tree in next week and will be temporarily package.masked. Later this change will be > > > backported to new versions in older slots. > > > - All packages, which use PyXML, will have to be patched to call xml.use_pyxml(). The following > > > code should be added before first import of anything from xml module: > > > > > > import xml > > > if hasattr(xml, "use_pyxml"): > > > xml.use_pyxml() > > > > Is this "use_pyxml" upstream? From what you are saying, it is not. In > > that case, we have just made patches for every package that will never > > be allowed upstream. Why not do something more worthwhile than waste the > > time of having to support something that might just become a problem to > > maintain in the future? > > > > I second that. Why do we need to make all the work fixing packages > instead of letting upstream do their job? I am not so excited to > fix every package I maintain as it is quite possible to introduce > regressions in the process. Furthermore, I don't understand your first > message. You say that you will provide xml.use_pyxml() function on > python-2.7. Is this code official or you are just patching the official > python releases? > Anyway, as I said, I'd rather wait for upstream to fix their packages > instead of me. Some upstreams are dead and some packages using PyXML will never be ported by upstreams to use something else than PyXML (e.g. lxml). $ python2.7 Python 2.7.1+ (2.7:572fbd9ca28f+, May 16 2011, 21:40:05) [GCC 4.5.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import xml, _xmlplus >>> xml_modules = set(xml.__all__) >>> _xmlplus_modules = set(_xmlplus.__all__) >>> xml_modules - _xmlplus_modules set(['etree']) >>> _xmlplus_modules - xml_modules set(['xpath', 'utils', 'schema', 'marshal', 'xslt']) >>> -- Arfrever Frehtes Taifersar Arahesis