diff options
author | R David Murray <rdmurray@bitdance.com> | 2013-02-19 23:32:28 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2013-02-19 23:32:28 (GMT) |
commit | 87632f1a9ec1dd310df1b0addc4c8842d83828bf (patch) | |
tree | 4f750a791e5dbf931ce9caead5d738043b4b5f00 /Lib/ftplib.py | |
parent | 8aa164b395d785598b0708644a6802b71d78660c (diff) | |
download | cpython-87632f1a9ec1dd310df1b0addc4c8842d83828bf.zip cpython-87632f1a9ec1dd310df1b0addc4c8842d83828bf.tar.gz cpython-87632f1a9ec1dd310df1b0addc4c8842d83828bf.tar.bz2 |
#6623: Add explicit deprecation warning for ftplib.Netrc.
Diffstat (limited to 'Lib/ftplib.py')
-rw-r--r-- | Lib/ftplib.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py index 6aecd28..8d99158 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -39,6 +39,7 @@ python ftplib.py -d localhost -l -p -l import os import sys import socket +import warnings from socket import _GLOBAL_DEFAULT_TIMEOUT __all__ = ["FTP","Netrc"] @@ -953,6 +954,8 @@ class Netrc: __defacct = None def __init__(self, filename=None): + warnings.warn("This class is deprecated, use the netrc module instead", + DeprecationWarning, 2) if filename is None: if "HOME" in os.environ: filename = os.path.join(os.environ["HOME"], |