[zope2-tracker] [Bug 539181] [NEW] reStructuredText fails to import docutils.parser.rst

Florian Friesdorf flo at chaoflow.net
Mon Mar 15 13:21:11 EDT 2010


Public bug reported:

- reStructuredText imports docutils.parser.rst
- docutils.parser.rst needs roman
- roman is an optional dependency of docutils which is currently not pulled in

I could not make sense from docutils' setup.py - When installing it into
a virtualenv with easy_install from distribute, it does not install
roman. When using pip there remains a roman.py in site-packages,
however, no egg-info and pip does not tell anything about installing
roman as a dependecy - it seems like a bug, that roman is put into site-
packages by pip.

I think reStructuredText should require roman or require docutils in a
way, that roman is pulled in.

ipdb session:

> /home/cfl/.cache/buildout/eggs/Zope2-2.12.3-py2.6-linux-x86_64.egg/reStructuredText/__init__.py(34)<module>()
     33 # parameter to False.

---> 34 import docutils.parsers.rst
     35 for title, options, conf in docutils.parsers.rst.Parser.settings_spec[2]:

ipdb> l
     29 """ % {'version' : docutils.__version__, 'path' : docutils.__path__[0] }
     30 
     31 # Disable inclusion of files for security reasons.  We do this by

     32 # changing the default value of the ``file_insertion_enabled``

     33 # parameter to False.
---> 34 import docutils.parsers.rst
     35 for title, options, conf in docutils.parsers.rst.Parser.settings_spec[2]:
     36     if options == ['--file-insertion-enabled']:
     37         conf['default'] = 0
     38         break
     39 

ipdb> n
> /home/cfl/.cache/buildout/eggs/docutils-0.6-py2.6.egg/docutils/parsers/rst/__init__.py(76)<module>()
     75 import ipdb;ipdb.set_trace()
---> 76 from docutils.parsers.rst import states
     77 from docutils import frontend, nodes

ipdb> n
ImportError: 'No module named roman'
> /home/cfl/.cache/buildout/eggs/docutils-0.6-py2.6.egg/docutils/parsers/rst/__init__.py(76)<module>()
     75 import ipdb;ipdb.set_trace()
---> 76 from docutils.parsers.rst import states
     77 from docutils import frontend, nodes

** Affects: zope2
     Importance: Undecided
         Status: New

-- 
reStructuredText fails to import docutils.parser.rst
https://bugs.launchpad.net/bugs/539181
You received this bug notification because you are a member of Zope 2
Developers, which is subscribed to Zope 2.


More information about the zope2-tracker mailing list