python 2.3.1 issues DeprecationWarning for FCNTL when importing tempfile

Pierre Rouleau prouleau at impathnetworks.com
Fri Oct 3 12:26:49 EDT 2003


>>Whenever a file imports the standard tempfile module, Python 2.3.1
>>issues the following warning:
>>
>>C:\Python23\lib\fcntl.py:7: DeprecationWarning: the FCNTL module is
>>Deprecated; please use fcntl DeprecationWarning).
>>
>>A quick look into tempfile.py show that it does import fcnt.  Python
>>2.3 tempfile documentation says that it was changed.  Was the use of
>>fcntl() forgotten?  Is this a bug?
> 
> 
> Do you have the environment variable PYTHONCASEOK set?  You probably
> don't want to...
> 

No, PYTHONCASEOK is not set.

I get the problem with right away in the python shell:

D:\dev\python>python
Python 2.3.1 (#47, Sep 23 2003, 23:47:32) [MSC v.1200 32 bit (Intel)] on 
  win32
Type "help", "copyright", "credits" or "license" for more information.
 >>> import tempfile
c:\python23\lib\fcntl.py:7: DeprecationWarning: the FCNTL module is 
deprecated; please use fcntl
   DeprecationWarning)
 >>>
 >>> import os
 >>> 'PYTHONCASEOK' in os.environ
False
 >>>

I also tried it within PythonWin: same result.


PythonWin 2.3.1 (#47, Sep 23 2003, 23:47:32) [MSC v.1200 32 bit (Intel)] 
on win32.
Portions Copyright 1994-2001 Mark Hammond (mhammond at skippinet.com.au) - 
see 'Help/About PythonWin' for further copyright information.
 >>> import tempfile
C:\Python23\lib\fcntl.py:7: DeprecationWarning: the FCNTL module is 
deprecated; please use fcntl
   DeprecationWarning)
 >>> import os
 >>> 'PYTHONCASEOK' in os.environ
False
 >>>

I did not edit any of the files in the Python library.  It does the same 
on WinNT and Win2000 but i also tried it on a XP machine and the problem 
is not on the XP machine.  But the source is the same on the XP machine 
(the FCNTL.py and tempfile.py) and the NT and 2000 machines.

I am starting to wonder if the problem is caused by a package that was 
installed on one set of machines and not the other.

Thanks!

Pierre





More information about the Python-list mailing list