mirror of
https://github.com/python/cpython.git
synced 2025-12-08 18:32:16 +00:00
Add a new FCNTL.py backward compatibility module that issues a deprecation
warning. This is similar to the TERMIOS backward compatbility module.
This commit is contained in:
parent
bc7809b529
commit
76d6139961
1 changed files with 14 additions and 0 deletions
14
Lib/FCNTL.py
Normal file
14
Lib/FCNTL.py
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
"""Backward-compatibility version of FCNTL; export constants exported by
|
||||||
|
fcntl, and issue a deprecation warning.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import warnings
|
||||||
|
warnings.warn("the FCNTL module is deprecated; please use fcntl",
|
||||||
|
DeprecationWarning)
|
||||||
|
|
||||||
|
|
||||||
|
# Export the constants known to the fcntl module:
|
||||||
|
from fcntl import *
|
||||||
|
|
||||||
|
# and *only* the constants:
|
||||||
|
__all__ = [s for s in dir() if s[0] in "ABCDEFGHIJKLMNOPQRSTUVWXYZ"]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue