Cause posixfile to raise a DeprecationWarning. Documented as deprecated since

Ptyhon 1.5.
This commit is contained in:
Brett Cannon 2007-05-20 23:57:38 +00:00
parent 49da0ead95
commit 41bf2fad62
3 changed files with 73 additions and 66 deletions

View file

@ -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."""