Mercurial > cpython-lru_cache-weakref
diff Lib/string.py @ 53909:238502460795
#4351: more appropriate DeprecationWarning stacklevels
| author | Philip Jenvey <pjenvey@underboss.org> |
|---|---|
| date | Fri, 08 May 2009 03:57:12 +0000 |
| parents | 4407e4d07084 |
| children | f3c595214abc a37bb59d4b53 |
line wrap: on
line diff
--- a/Lib/string.py Fri May 08 03:31:15 2009 +0000 +++ b/Lib/string.py Fri May 08 03:57:12 2009 +0000 @@ -51,7 +51,7 @@ """ import warnings warnings.warn("string.maketrans is deprecated, use bytes.maketrans instead", - DeprecationWarning) + DeprecationWarning, 2) if len(frm) != len(to): raise ValueError("maketrans arguments must have same length") if not (isinstance(frm, bytes) and isinstance(to, bytes)):
