This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Python 2.4c1 test_univnewlines.py fails within IDLE IDE
Type: Stage:
Components: IDLE Versions: Python 2.4
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: kbk Nosy List: kbk, ncoghlan, pieterb, scott_daniels
Priority: low Keywords:

Created on 2004-11-19 14:33 by pieterb, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (7)
msg23218 - (view) Author: PieterB (pieterb) Date: 2004-11-19 14:33
On my WinXP SP 1 system with Python2.4c1.msi installed
the testcase test_univnewlines.py fails:

Traceback (most recent call last):
  File "C:\Python24\Lib\test\test_univnewlines.py",
line 8, in -toplevel-
    raise test_support.TestSkipped, \
TestSkipped: This Python does not have universal
newline support

I assume Python on WinXP should have universal newline
support. This also causes 
test_subprocess.py to fail at line 334.

Furthermore my test_descr also fails, but I don't know
if it's related:

...
Testing methods...
Testing special operators...

Traceback (most recent call last):
  File "C:\Python24\Lib\test\test_descr.py", line 4065,
in -toplevel-
    test_main()
  File "C:\Python24\Lib\test\test_descr.py", line 4008,
in test_main
    specials()
  File "C:\Python24\Lib\test\test_descr.py", line 1875,
in specials
    print Letter('w')
PicklingError: Can't pickle <class '__main__.Letter'>:
attribute lookup __main__.Letter failed
msg23219 - (view) Author: Scott David Daniels (scott_daniels) * Date: 2004-11-20 01:01
Logged In: YES 
user_id=493818

Not replicated on Win2K Service Pack 4.
All named tests pass here.
msg23220 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2004-11-22 12:19
Logged In: YES 
user_id=1038590

Win XP Pro, SP 1 here: 240 tests OK, 50 tests skipped (all
expected skips)

The OP needs to check their path settings and their file
associations. If 2.4c1 is installed without registering the
extensions, then the regression tests should be run using:

c:
cd \Python24\Lib\test
\Python24\python.exe regrtest.py

If the .py file association is to a previous version (e.g.
2.2), then "regrtest.py" will invoke that version.

Similarly, if a previous version is on the path, "python
regrtest.py" will also invoke the incorrect version.
msg23221 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2004-11-22 13:51
Logged In: YES 
user_id=1038590

The three tests mentioned (test_univnewlines,
test_subprocess & test_descr) also all work correctly for me
when invoked directly, rather than through regrtest.py.
msg23222 - (view) Author: PieterB (pieterb) Date: 2004-11-22 22:13
Logged In: YES 
user_id=458461

I ran the tests through the IDLE IDE. All tests succeed when
I run regrtest.py from a command prompt or from with Cygwin
1.5.11. (240 tests OK, 50 tests skipped as expected) 

I don't know if running the tests and/or using universal
newlines support within IDLE is/will be supported. Please
close this bug if it's inappropriate.

For more information 
Python is not in the PATH and
TIX_LIBRARY=C:\Python24\tcl\tix8.1 and
TK_LIBRARY=C:\Python24\tcl\tk8.4

From Python shell within IDLE:

>>> import sys
>>> dir(sys.stdin)
['_RPCProxy__attributes', '_RPCProxy__getattributes',
'_RPCProxy__getmethods', '_RPCProxy__methods', '__doc__',
'__getattr__', '__init__', '__module__', 'encoding', 'oid',
'sockio']
>>> print sys.stdin
<idlelib.rpc.RPCProxy instance at 0x00B20508>

From a Python shell run from a command prompt:

>>> import sys
>>> dir(sys.stdin)
['__class__', '__delattr__', '__doc__', '__getattribute__',
'__hash__', '__init__', '__iter__', '__new__', '__reduce__',
'__reduce_ex__', '__repr__', '__setattr__', '__str__',
'close', 'closed', 'encoding', 'fileno', 'flush', 'isatty',
'mode', 'name', 'newlines', 'next', 'read', 'readinto',
'readline', 'readlines', 'seek', 'softspace', 'tell',
'truncate', 'write', 'writelines', 'xreadlines']
>>> print sys.stdin
<open file '<stdin>', mode 'r' at 0x0095E020>

PS: I changed the summary because this problem is IDLE specific.
msg23223 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2004-11-23 09:07
Logged In: YES 
user_id=1038590

Ah, that makes a big difference - running through IDLE I get
the same three errors (failures in test_descr and
test_subprocess, skip on test_univnewlines).

I'd be inclined to keep the bug, but change the category to
IDLE and assign it to Kurt (SF user 'kbk'). IDLE's his baby
so he can make the call as to whether this is a bug, or
unfortunate but expected behaviour.
msg23224 - (view) Author: Kurt B. Kaiser (kbk) * (Python committer) Date: 2006-07-27 02:33
Logged In: YES 
user_id=149084

I don't expect IDLE to be able to pass all the
Python tests.  It does pretty well, considering it's
really two instances of Python communicating with
each other.

test_descr:  there is a special test which fails
which causes IDLE to try to pickle an embedded class,
which is illegal, to communicate with its GUI.

The test_subprocess passes on 2.5.

The universal newline support isn't included in IDLE
because as an editor, IDLE preserves the line endings
in the original file.  Any edits are done using the
'native' line endings for that file.  This allows IDLE
files on disc to be moved between different platforms.

If any failing tests are identified in the future which
affect IDLE's functionality or the correct execution of
'real' Python code, please post a bug on the tracker.
History
Date User Action Args
2022-04-11 14:56:08adminsetgithub: 41197
2004-11-19 14:33:08pieterbcreate