472,336 Members | 1,263 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,336 software developers and data experts.

python 2.3.1 issues DeprecationWarning for FCNTL when importing tempfile

Hi all!

I am using Python 2.3.1 on Win32 (NT, 2000).

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?

Thanks for your time.

Pierre

Jul 18 '05 #1
6 3668
Pierre Rouleau <pr******@impathnetworks.com> writes:
Hi all!

I am using Python 2.3.1 on Win32 (NT, 2000).

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...

Cheers,
mwh

--
The "of course, while I have no problem with this at all, it's
surely too much for a lesser being" flavor of argument always
rings hollow to me. -- Tim Peters, 29 Apr 1998
Jul 18 '05 #2
>>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 (mh******@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

Jul 18 '05 #3
Pierre Rouleau <pr******@impathnetworks.com> writes:
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.


Hmm, weird.
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

^^^^^^^^
This is a bit bizarre; the file is really called FCNTL.py, right?
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.


Could be. I've reached the outer edge of my windows knowledge (not
very far, you'll notice), so I hope another reader can get you
further...

Cheers,
mwh

--
You're posting to a Scheme group. Around here, arguing that Java is
better than C++ is like arguing that grasshoppers taste better than
tree bark. -- Thant Tessman, comp.lang.scheme
Jul 18 '05 #4

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


^^^^^^^^
This is a bit bizarre; the file is really called FCNTL.py, right?

Yes. The file is old though:

C:\Python23\Lib>ls -l [fF]*.py
-rwxrwxrwa 1 Administrators None 418 May 9 2001 FCNTL.py
-rwxrwxrwa 1 Administrators None 10173 Sep 2 07:47 filecmp.py
-rwxrwxrwa 1 Administrators None 12732 Jan 8 2003 fileinput.py
-rwxrwxrwa 1 Administrators None 3126 Jul 13 18:06 fnmatch.py
-rwxrwxrwa 1 Administrators None 15548 Feb 27 2003 formatter.py
-rwxrwxrwa 1 Administrators None 4709 Jan 21 2001 fpformat.py
-rwxrwxrwa 1 Administrators None 27589 Jun 3 2002 ftplib.py

I wonder if FCNTL.py is a valid file. Here is what it contains:

C:\Python23\Lib>cat FCNTL.py
cat FCNTL.py
"""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"]

C:\Python23\Lib>

----

BTW, I solved the problem by deleting the fcntl.pyc. See my other post
below.

Thanks for your help!

Jul 18 '05 #5
Pierre Rouleau <pr******@impathnetworks.com> writes:
BTW, I solved the problem by deleting the fcntl.pyc. See my other
post below.


Actaully, I read this thread completely out of order, but glad to see
you got it sorted. Definitely a good mystery!

Cheers,
mwh

--
I have a feeling that any simple problem can be made arbitrarily
difficult by imposing a suitably heavy administrative process
around the development. -- Joe Armstrong, comp.lang.functional
Jul 18 '05 #6
Michael Hudson wrote:

Pierre Rouleau <pr******@impathnetworks.com> writes:
BTW, I solved the problem by deleting the fcntl.pyc. See my other
post below.


use McMillan installer on Windows, too, and I've also been getting
these messages. Didn't know they were fixable until reading this
thread. I was getting two sets of messages, one for fcntl and one
for termios. Each of these had a *.py, a *.pyc, and a *.pyo in the
python\Lib folder. Deleting them all seems to fix it.

Al
Jul 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rami A. Kishek | last post by:
Please help! Very strange installation problem. First, let me say I successfully installed and use Python 2.2.3 and 2.3 from the EXE binaries on...
1
by: hellprout | last post by:
hi , i want to use mcmillan installer 5_5b5 with python 2.3 so , no problem when i compil this prog but when i'm using installer i have an error...
0
by: Ryan Grow | last post by:
Hi, I'm trying to use fcntl to set an existing file descriptor to be nonblocking. This contrived example exhibits the behavior of python that is...
6
by: Lex Hider | last post by:
Hi, Apologies if this is against etiquette. I've just got my first python app up and running. It is a podcast aggregator depending on feedparser....
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 342 open (-38) / 3712 closed (+54) / 4054 total (+16) Bugs : 951 open (-14) / 6588...
2
by: xucs007 | last post by:
I ran following 2 programs (lock1, lock2) at almost same time, to write either "123456", or "222" to file "aaa" at the same time. But I often just...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.