[pypy-issue] [issue914] Missing xml.parsers.expat.model

Peter tracker at bugs.pypy.org
Tue Oct 18 16:13:39 CEST 2011


New submission from Peter <p.j.a.cock at googlemail.com>:

The following should work on C Python 2.0 or later, here using Python 2.6.1

>>> from xml.parsers.expat import model
>>> model.XML_CTYPE_ANY
2
>>> help(model)

Help on module pyexpat.model in pyexpat:

NAME
    pyexpat.model - Constants used to interpret content model information.

FILE
    (built-in)

DATA
    XML_CQUANT_NONE = 0
    XML_CQUANT_OPT = 1
    XML_CQUANT_PLUS = 3
    XML_CQUANT_REP = 2
    XML_CTYPE_ANY = 2
    XML_CTYPE_CHOICE = 5
    XML_CTYPE_EMPTY = 1
    XML_CTYPE_MIXED = 3
    XML_CTYPE_NAME = 4
    XML_CTYPE_SEQ = 6


This fails on PyPy 1.6,

>>>> from xml.parsers.expat import model
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ImportError: cannot import name 'model'

See also: http://docs.python.org/library/pyexpat.html

----------
messages: 3342
nosy: pypy-issue
priority: bug
release: 1.6
status: unread
title: Missing xml.parsers.expat.model

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue914>
________________________________________


More information about the pypy-issue mailing list