Working towards retiring PyXML

Toshio Kuratomi a.badger at gmail.com
Tue Jul 31 05:16:55 UTC 2012


On Fri, Jul 27, 2012 at 12:27:31PM +1000, Nick Coghlan wrote:
> On 07/27/2012 07:28 AM, David Malcolm wrote:
> > With my proposed approach, you have to opt-in, your code can say: when I
> > say "xml", I really mean "xml", not "_xmlplus".
> 
> You can do much the same thing at the application level without patching
> the stdlib:
> 
> import xml
> xml.__path__.reverse() # If both are available, prefer stdlib over PyXML
> 
> The key point is to keep both path fragments, and just rearrange the
> order so the standard lib if first. That way the PyXML-only stuff will
> still be accessible, but the stdlib will be preferred for any name
> conflicts in package level components that get imported after the path
> reversal.
> 
Thanks, Nick!

I just patched docutils with this and submitted the patch to docutils
upstream.  Works in my testing.

I've still got the wiki page for removing PyXML open:
https://fedoraproject.org/wiki/User:Toshio/Remove_PyXML

with bug reports for all the packages that require PyXML but I guess it's
not as critical since there's a workaround.  I still haven't heard back from
rrakus about whether he is still a big believer in deprecating the PyXML
package in Fedora so I guess we'll see what happens.

-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/python-devel/attachments/20120730/e432692f/attachment.sig>


More information about the python-devel mailing list