From 73019073583d786f8c486da11978c589daf36138 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Wed, 10 Apr 2002 21:36:11 +0000 Subject: Add deprecation warning to 'pre' module --- Lib/pre.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/pre.py b/Lib/pre.py index 1665660..817f8de 100644 --- a/Lib/pre.py +++ b/Lib/pre.py @@ -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"] -- cgit v0.12