[Python-bugs-list] [ python-Bugs-537998 ] windows getpass broken on python 2.2

noreply@sourceforge.net noreply@sourceforge.net
Tue, 02 Apr 2002 11:18:17 -0800


Bugs item #537998, was opened at 2002-04-01 15:05
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=537998&group_id=5470

Category: Windows
>Group: Not a Bug
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Brian Kelley (wc2so1)
Assigned to: Tim Peters (tim_one)
Summary: windows getpass broken on python 2.2

Initial Comment:
Windows 2000 Python 2.2

>>> import getpass
C:\Python22\lib\termios.py:7: DeprecationWarning: the
TERMIOS module is deprecated; please use termios
  DeprecationWarning)
>>> getpass.getpass()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "c:\python22\lib\getpass.py", line 29, in
unix_getpass
    old = termios.tcgetattr(fd)     # a copy to save
AttributeError: 'module' object has no attribute
'tcgetattr'
>>>

I think the problem is that TERMIOS.py and termios.py
are the same thing on windows which causes a strange
Deprecation warning.  Python 2.1 used to fail on import
of termios

C:\Documents and Settings\bkelley\My
Documents\Downloads\Webware>python
Python 2.2 (#28, Dec 21 2001, 12:21:22) [MSC 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for
more information.
>>> import termios
C:\Python22\lib\termios.py:7: DeprecationWarning: the
TERMIOS module is deprecated; please use termios
  DeprecationWarning)

anyway, TERMIOS.py should probably not be installed on
windows.  This should be removed from 2.2.1c2
Brian


----------------------------------------------------------------------

>Comment By: Tim Peters (tim_one)
Date: 2002-04-02 14:18

Message:
Logged In: YES 
user_id=31435

Closing as Not-a-Bug.  If it pops up again, we can reopen 
it.  PYTHONCASEOK will probably never die -- as the "Import 
on Case-Insensitive Filesystems" PEP explains, it's 
necessary if Python is to work at all on some case-
*destroying* filesystems (which, alas, still exist).

----------------------------------------------------------------------

Comment By: Brian Kelley (wc2so1)
Date: 2002-04-02 13:50

Message:
Logged In: YES 
user_id=424987

For some reason a lowercase "termios.pyc" ended up in my
python directory.  I removed it and everything worked fine.
 If it happens again, I'll let you all know.

----------------------------------------------------------------------

Comment By: Michael Hudson (mwh)
Date: 2002-04-02 13:40

Message:
Logged In: YES 
user_id=6656

Oh good.  Lowering priority on assumption this isn't our 
fault.

Maybe PYTHONCASEOK should die?


----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2002-04-01 16:09

Message:
Logged In: YES 
user_id=31435

getpass() works fine on Windows:

C:\Python22>python
Python 2.2.1c2 (#33, Mar 26 2002, 13:04:18) [MSC 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more 
information.
>>> import getpass
>>> getpass.getpass()
Password:
'abc'
>>>

I suspect Brian has set the PYTHONCASEOK envar on Windows, 
in which case any number of insane things can happen (it 
tells Python to ignore case mismatches then).  Brian?

Not shipping TERMIOS.py isn't an option.

----------------------------------------------------------------------

Comment By: Michael Hudson (mwh)
Date: 2002-04-01 15:45

Message:
Logged In: YES 
user_id=6656

Oops.  That sucks.

Tim, this must be case confusion of some kind.  termios.py 
has never existed, however there's now a placeholder Lib/
TERMIOS.py, deprecated in favour of using the termios 
(lowercase) module.  Is Brian's suggestion of just not 
installing TERMIOS.py feasible?

Brian: thanks!


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=537998&group_id=5470