FCNTL module deprecation warning

Andrew MacIntyre andymac at bullseye.apana.org.au
Tue Jul 15 06:27:18 EDT 2003


On Tue, 15 Jul 2003, Meyer, Tony wrote:

> (I did try to google for an answer to this, but couldn't find anything,
> although plenty of instances of the warning).
>
> I don't understand this warning:
> >>> import fcntl
> C:\Program Files\Python23\lib\fcntl.py:7: DeprecationWarning: the FCNTL
> module is deprecated; please use fcntl
>   DeprecationWarning)
> >>>
>
> It seems to be saying that I shouldn't use "import FCNTL" (which gives
> the same warning), but "import fcntl", but that's what I _am_ doing.
>
> (I don't actually even import fnctl, but httplib does, and causes this
> all over the place.
>
> Any light shedding would be appreciated.

You don't state your exact platform, but the filename quoted is a
MS-DOSish form.

Python natively is case-sensitive.  Windows 9x and later, and OS/2 with
HPFS file systems, are case-insensitive but case-preserving.  So Python
relies on the case preservation when trying to match a filename to a
module name.  This behaviour can be turned off with the PYTHONCASEOK
environment variable.

I would hazard a guess that either:-

a) you have the PYTHONCASEOK environment variable set when you shouldn't;
or
b) you have Python installed on a non-case-preserving file system (like
FAT12 or FAT16); or
c) you installed Python with tools that didn't preserve the case of the
files in the Python library.

--
Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: andymac at bullseye.apana.org.au  (pref) | Snail: PO Box 370
        andymac at pcug.org.au             (alt) |        Belconnen  ACT  2616
Web:    http://www.andymac.org/               |        Australia





More information about the Python-list mailing list