]> granicus.if.org Git - python/commitdiff
Add deprecation warning to 'pre' module
authorAndrew M. Kuchling <amk@amk.ca>
Wed, 10 Apr 2002 21:36:11 +0000 (21:36 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Wed, 10 Apr 2002 21:36:11 +0000 (21:36 +0000)
Lib/pre.py

index 1665660bd8afb1d3df3e1a1fe50f28d625af44a3..817f8de37ba33c2d6721d6609d27d7574b1ed691 100644 (file)
@@ -87,6 +87,12 @@ This module also defines an exception 'error'.
 import sys
 from pcre import *
 
+# XXX This module is deprecated as of Python 2.3, and should be removed
+# in the version that follows 2.3.
+import warnings as _warnings
+_warnings.warn("Please use the 're' module, not the 'pre' module",
+               DeprecationWarning)
+                            
 __all__ = ["match","search","sub","subn","split","findall","escape","compile",
            "I","L","M","S","X","IGNORECASE","LOCALE","MULTILINE","DOTALL",
            "VERBOSE","error"]