Gentoo Archives: gentoo-dev

From: Arfrever Frehtes Taifersar Arahesis <Arfrever@g.o>
To: Gentoo Development <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] PyXML
Date: Tue, 17 May 2011 20:53:42
Message-Id: 201105172253.04350.Arfrever@gentoo.org
In Reply to: Re: [gentoo-dev] PyXML by "Tomáš Chvátal"
1 2011-05-17 21:21:48 Tomáš Chvátal napisał(a):
2 > Dne 17.5.2011 21:12, Arfrever Frehtes Taifersar Arahesis napsal(a):
3 > > 2011-05-17 20:43:29 Tomáš Chvátal napisał(a):
4 > >> Dne 10.5.2011 23:21, Arfrever Frehtes Taifersar Arahesis napsal(a):
5 > >>> PyXML is dead:
6 > >>> http://mail.python.org/pipermail/xml-sig/2004-November/010735.html
7 > >>> http://mail.python.org/pipermail/xml-sig/2006-June/011545.html
8 > >>>
9 > >>> PyXML provides _xmlplus module, which replaces xml module (from standard library) at run time,
10 > >>> which might result in various problems.
11 > >>>
12 > >>> I'm planning to implement the following solution:
13 > >>> - Python >=2.7.1-r2:2.7 will provide xml.use_pyxml() function. Calling of this function will be
14 > >>> necessary to use replace xml module with _xmlplus module. Python >=2.7.1-r2:2.7 will be added
15 > >>> to the tree in next week and will be temporarily package.masked. Later this change will be
16 > >>> backported to new versions in older slots.
17 > >>> - All packages, which use PyXML, will have to be patched to call xml.use_pyxml(). The following
18 > >>> code should be added before first import of anything from xml module:
19 > >>>
20 > >>> import xml
21 > >>> if hasattr(xml, "use_pyxml"):
22 > >>> xml.use_pyxml()
23 > >>>
24 > >>> This code works with previous versions of Python, so no changes in dependencies are needed.
25 > >>>
26 > >> As I already asked,
27 > >> what problem do we have to keep PyXML in main tree to be used with python2.
28 > >>
29 > >> Your specific hack introduce different behaviour for python2.7.1-r2
30 > >> where you do not explain the need for it at all.
31 > >
32 > > I had already explained it in many places.
33 > >
34 > >> It is just python2 thing and we can happily use PyXML as it works even
35 > >> with latest python-2.7.
36 > >>
37 > >> So where is the problem?
38 > >
39 > > Fixes for at least the following bugs are absent when PyXML is installed:
40 > > http://bugs.python.org/issue4877
41 > > http://bugs.python.org/issue6098
42 > > http://bugs.python.org/issue5762
43 > > http://bugs.python.org/issue5027
44 > > http://bugs.python.org/issue9054
45 > > http://bugs.python.org/issue777884
46 > > http://bugs.python.org/issue1433694
47 > > http://bugs.python.org/issue847665
48 > > http://bugs.python.org/issue1472827
49 > > http://bugs.python.org/issue1094164
50 > > http://bugs.python.org/issue1309009
51 > > http://bugs.python.org/issue1262320
52 > > http://bugs.python.org/issue925152
53 > >
54 > 2 options
55 > 1) fix PyXML
56 > 2) drop all packages including PyXML
57 >
58 > Altering system package is not the option.
59
60 Changing of any package is always an option, when given change fixes or works around a problem
61 and its benefits outweigh costs. The patches for about 20 packages will be easy to maintain,
62 since there is easy algorithm of generation of these patches (addition of constant 3-line code
63 before first import of xml module).
64
65 --
66 Arfrever Frehtes Taifersar Arahesis

Attachments

File name MIME type
signature.asc application/pgp-signature