473,890 Members | 1,374 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

python 2.3.1 issues DeprecationWarn ing 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: DeprecationWarn ing: the FCNTL module is
Deprecated; please use fcntl DeprecationWarn ing).

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 3839
Pierre Rouleau <pr******@impat hnetworks.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: DeprecationWarn ing: the FCNTL module is
Deprecated; please use fcntl DeprecationWarn ing).

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\l ib\fcntl.py:7: DeprecationWarn ing: the FCNTL module is
Deprecated; please use fcntl DeprecationWarn ing).

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>p ython
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: DeprecationWarn ing: the FCNTL module is
deprecated; please use fcntl
DeprecationWarn ing)
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******@skipp inet.com.au) -
see 'Help/About PythonWin' for further copyright information. import tempfile C:\Python23\lib \fcntl.py:7: DeprecationWarn ing: the FCNTL module is
deprecated; please use fcntl
DeprecationWarn ing) 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******@impat hnetworks.com> writes:
Whenever a file imports the standard tempfile module, Python 2.3.1
issues the following warning:

C:\Python23\l ib\fcntl.py:7: DeprecationWarn ing: the FCNTL module is
Deprecated; please use fcntl DeprecationWarn ing).

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>p ython
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: DeprecationWarn ing: 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.schem e
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\l ib\fcntl.py:7: DeprecationWarn ing: 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",
DeprecationWarn ing)
# 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 "ABCDEFGHIJKLMN OPQRSTUVWXYZ"]

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******@impat hnetworks.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.funct ional
Jul 18 '05 #6
Michael Hudson wrote:

Pierre Rouleau <pr******@impat hnetworks.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
3726
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 a win ME machine. That machine previously had 1.5.2, and now I have access to all 3 versions. When I tried to do the same on an older machine, however, running Win98 SE (and having had Python 1.5.2 previously installed there), the installation doesn't work: Obvious problems: * IDLE...
1
1359
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 D:\Python23\lib\fcntl.py:7: DeprecationWarning: the FCNTL module is deprecated; please use fcntl DeprecationWarning)
0
1563
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 preventing me from doing this: import os, fcntl, FCNTL file = open("/tmp/testfd.txt", 'w')
6
1921
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. I've really only learnt enough to get this up and running. Any tips on the code quality and use of python would be appreciated. I've got a feeling the overall structure is up the creek. approx 220 LOC. file: GodCast.py
0
11532
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 closed (+33) / 7539 total (+19) RFE : 257 open (-15) / 266 closed (+13) / 523 total ( -2) New / Reopened Patches ______________________
2
3657
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 got "222456" in "aaa" . Is this a bug of python fcntl module ? See 2 programs I ran: #!/usr/bin/env python import fcntl, time
0
9978
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9819
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9625
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8015
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7169
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5846
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6041
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4674
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3275
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.