summaryrefslogtreecommitdiff
path: root/docutils/readers
diff options
context:
space:
mode:
authorcben <cben@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2004-07-25 01:45:27 +0000
committercben <cben@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2004-07-25 01:45:27 +0000
commit8c19a64febd90ef185c513580ac49bed2a151cf7 (patch)
tree339bcb037dfdb31353dc089a3d93a81c1a0df434 /docutils/readers
parent2fcfa82b9d58f763d522eafdf22a0733e14960c5 (diff)
downloaddocutils-8c19a64febd90ef185c513580ac49bed2a151cf7.tar.gz
Allow the test suite to survive unimportable test modules.
Notably, this fixes a crash on importing `moduleparser` under Python 2.1 from ``test/test_readers/test_python/test_functions.py``. (This shouldn't happen anyway, added to BUGS.txt) git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@2449 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/readers')
-rw-r--r--docutils/readers/python/__init__.py3
-rw-r--r--docutils/readers/python/moduleparser.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/docutils/readers/python/__init__.py b/docutils/readers/python/__init__.py
index 14d01c0c8..6c027641d 100644
--- a/docutils/readers/python/__init__.py
+++ b/docutils/readers/python/__init__.py
@@ -6,6 +6,9 @@
"""
This package contains the Python Source Reader modules.
+
+It requires Python 2.2 or higher (`moduleparser` depends on `compiler` and
+`tokenizer` modules).
"""
__docformat__ = 'reStructuredText'
diff --git a/docutils/readers/python/moduleparser.py b/docutils/readers/python/moduleparser.py
index ddfe21ea7..8fd7ed67b 100644
--- a/docutils/readers/python/moduleparser.py
+++ b/docutils/readers/python/moduleparser.py
@@ -5,7 +5,7 @@
# Copyright: This module has been placed in the public domain.
"""
-Parser for Python modules.
+Parser for Python modules. Requires Python 2.2 or higher.
The `parse_module()` function takes a module's text and file name,
runs it through the module parser (using compiler.py and tokenize.py)