diff options
author | Brett Cannon <bcannon@gmail.com> | 2007-05-20 23:57:38 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2007-05-20 23:57:38 (GMT) |
commit | 41bf2fad62e4c9d0c6310e4aec30bc41cabf4871 (patch) | |
tree | 251796bff91ef42723959d7401536799a8fe4d69 /Lib/posixfile.py | |
parent | 49da0ead9589b4baf69586a6cec2f75cb72656af (diff) | |
download | cpython-41bf2fad62e4c9d0c6310e4aec30bc41cabf4871.zip cpython-41bf2fad62e4c9d0c6310e4aec30bc41cabf4871.tar.gz cpython-41bf2fad62e4c9d0c6310e4aec30bc41cabf4871.tar.bz2 |
Cause posixfile to raise a DeprecationWarning. Documented as deprecated since
Ptyhon 1.5.
Diffstat (limited to 'Lib/posixfile.py')
-rw-r--r-- | Lib/posixfile.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/posixfile.py b/Lib/posixfile.py index 763c605..2fa600f 100644 --- a/Lib/posixfile.py +++ b/Lib/posixfile.py @@ -52,7 +52,9 @@ f.lock(mode [, len [, start [, whence]]]) note: - the '?' modifier prevents a region from being locked; it is query only """ - +import warnings +warnings.warn("The posixfile module is deprecated; " + "fcntl.lockf() provides better locking", DeprecationWarning, 2) class _posixfile_: """File wrapper class that provides extra POSIX file routines.""" |