mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Cause posixfile to raise a DeprecationWarning. Documented as deprecated since
Ptyhon 1.5.
This commit is contained in:
parent
49da0ead95
commit
41bf2fad62
3 changed files with 73 additions and 66 deletions
|
|
@ -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."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue