FCNTL module deprecation warning

Tim Peters tim.one at comcast.net
Tue Jul 15 19:15:16 EDT 2003


[Tony Meyer]
> My question is then why the 2.3b2 Windows binary bothers installing
> the FCNTL.py file.

Because it would be enormously more bother to special-case it.  The Wise
script that generates the installer simply specifies that

    *.py

should be copied from the Lib directory in my build tree.  The only way to
exclude FCNTL.py would be to explicitly list every other .py file in the
Wise script.  That would never remain in synch with new .py files that
should be included, so "screw it" is my Professional Judgment <wink>.

> fnctl isn't available on Windows anyway (going by
> the docs and that there isn't a fnctl.py file installed).
>
> Shouldn't the correct behaviour be to raise an ImportError if a
> windows user tries to import fcntl or FCNTL?

It does for me:

>>> import fcntl
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named fcntl
>>> import FCNTL
C:\CODE\PYTHON\lib\FCNTL.py:7: DeprecationWarning: the FCNTL module is
deprecated; please use fcntl
  DeprecationWarning)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "C:\CODE\PYTHON\lib\FCNTL.py", line 11, in ?
    from fcntl import *
ImportError: No module named fcntl
>>>

I get that under Python 2.2.3 and 2.3b2.






More information about the Python-list mailing list