Jason R. Coombs committed 531e11d

Expand documentation on evaluate_marker and indicate its legacy status.

Comments (0)

Files changed (1)

         return sys.exc_info()[1]
     return False
-def evaluate_marker(text, extra=None, _ops={}):
-    """Evaluate a PEP 426 environment marker; SyntaxError if marker is invalid"""
+def _evaluate_marker_legacy(text, extra=None, _ops={}):
+    """
+    Evaluate a PEP 426 environment marker on CPython 2.4+.
+    Return a boolean indicating the marker result in this environment.
+    Raise SyntaxError if marker is invalid.
+    This implementation uses the 'parser' module, which is not implemented on
+    Jython and has been superseded by the 'ast' module in Python 2.6 and
+    later.
+    """
     if not _ops:
     import parser
     return interpret(parser.expr(text).totuple(1)[1])
+evaluate_marker = _evaluate_marker_legacy
 class NullProvider:
     """Try to implement resources and metadata for arbitrary PEP 302 loaders"""