summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/tempfile.py12
-rw-r--r--Misc/NEWS5
2 files changed, 10 insertions, 7 deletions
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index ef6a1c5..ae2ed9e 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -38,17 +38,15 @@ if _os.name == 'mac':
try:
import fcntl as _fcntl
- # If PYTHONCASEOK is set on Windows, stinking FCNTL.py gets
- # imported, and we don't get an ImportError then. Provoke
- # an AttributeError instead in that case.
- _fcntl.fcntl
-except (ImportError, AttributeError):
+except ImportError:
def _set_cloexec(fd):
pass
else:
def _set_cloexec(fd):
- try: flags = _fcntl.fcntl(fd, _fcntl.F_GETFD, 0)
- except IOError: pass
+ try:
+ flags = _fcntl.fcntl(fd, _fcntl.F_GETFD, 0)
+ except IOError:
+ pass
else:
# flags read successfully, modify
flags |= _fcntl.FD_CLOEXEC
diff --git a/Misc/NEWS b/Misc/NEWS
index 003e3d5..cd34d13 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -34,6 +34,11 @@ Extension modules
Library
-------
+- The obsolete FCNTL.py has been deleted. The builtin fcntl module
+ has been available (on platforms that support fcntl) since Python
+ 1.5a3, and all FCNTL.py did is export fcntl's names, after generating
+ a deprecation warning telling you to use fcntl directly.
+
- Several new unicode codecs are added: big5hkscs, euc_jis_2004,
iso2022_jp_2004, shift_jis_2004.