#197 import collision with top-level declaration

PyXB 1.2.2
closed
None
fixed
Generation Model
major
PyXB 1.2.1
defect
2013-04-15
2013-04-13
No

When the schema references a namespace in module X to provide a complex type C, and also declares an element named X, and the reference to type X.C follows the definition of the element X, the names collide and you get:

AttributeError: 'element' object has no attribute 'C'

Same sort of problem as #191.

Discussion

  • Peter A. Bigot

    Peter A. Bigot - 2013-04-13
    • status changed from new to accepted
    • description modified (diff)
     
  • Peter A. Bigot

    Peter A. Bigot - 2013-04-13
    • description modified (diff)
     
  • Peter A. Bigot

    Peter A. Bigot - 2013-04-15
    • status changed from accepted to closed
    • resolution set to fixed

      commit e449cb77c74af2942296dfa0bc1be74973febae8
      Author: Peter A. Bigot pab@pabigot.com
      Date: Mon Apr 15 06:29:17 2013 -0500

      trac/197: import collision with top-level declaration
      
      Rework imports so that anything that does not come from the PyXB hierarchy
      is imported using a protected identifier with a fixed prefix
      ("ImportedBinding_") followed by a unique path.  The identifier is reserved
      within both the module and the classes.
      
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks