Subject: [xml2rfc] #235: freshly installed 2.4.5 bombs on context.resolvers.add(caching_resolver)

From: "xml2rfc issue tracker" <[email-masked]>
Date: Sat, 15 Feb 2014 13:13:38 -0000

#235: freshly installed 2.4.5 bombs on  context.resolvers.add(caching_resolver)

 $ pip install xml2rfc --upgrade
 ...2.4.5....
 ...lxml 3.3.1...

 $ xml2rfc kram.xml
 Parsing file kram.xml
 Traceback (most recent call last):
   File "/Users/cabo/bin/xml2rfc", line 225, in <module>
     main()
   File "/Users/cabo/bin/xml2rfc", line 139, in main
     xmlrfc = parser.parse()
   File
 "/Users/cabo/.homebrew/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7
 /site-packages/xml2rfc/parser.py", line 408, in parse
     context.resolvers.add(caching_resolver)
 AttributeError: 'lxml.etree.iterparse' object has no attribute 'resolvers'

-- 
---------------------------+----------------------------------
 Reporter:  [email-masked]   |      Owner:  [email-masked]
     Type:  defect         |     Status:  new
 Priority:  blocker        |  Milestone:
Component:  Version 2 cli  |    Version:  2.4.x
 Keywords:                 |
---------------------------+----------------------------------

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/235>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Sun, 16 Feb 2014 16:42:02 -0000

Changes (by [email-masked]):

 * status:  new => closed
 * resolution:   => invalid

Comment:

 This turns out to be a problem with pip.  The setup.py file for xml2rfc
 specifies that it needs lxml <= 3.2.1; as can be seen above, pip has
 installed lxml 3.3.1 (which is known to break in exactly the manner
 described above).

 Unfortunately, a bug in pip, which wasn't fixed until version 1.4, results
 in pip being unable to downgrade an install if there's a build directory
 which contains the higher-versioned package.

 The remedy is to upgrade pip, with "{{{pip install --upgrade pip}}}" and
 then do one of the following:

   * install a lower version of lxml with "{{{pip install 'lxml<=3.2.1'}}}"
   * install xml2rfc with --upgrade: "{{{pip install --upgrade xml2rfc}}}"
   * uninstall and then re-insall xml2rfc

-- 
----------------------------+----------------------------------
  Reporter:  [email-masked]   |      Owner:  [email-masked]
      Type:  defect         |     Status:  closed
  Priority:  blocker        |  Milestone:
 Component:  Version 2 cli  |    Version:  2.4.x
Resolution:  invalid        |   Keywords:
----------------------------+----------------------------------

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/235#comment:1>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Sun, 16 Feb 2014 16:43:11 -0000

Comment (by [email-masked]):

 PS:  xml2rfc will be rewritten for the next release to work around this,
 so it can function also with lxml >= 3.3.x

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/235#comment:2>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>