[Patches] [ python-Patches-619108 ] Fix test_pep277 on Win9x
noreply@sourceforge.net
noreply@sourceforge.net
Sun, 13 Oct 2002 03:49:18 -0700
Patches item #619108, was opened at 2002-10-06 03:13
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=619108&group_id=5470
Category: Windows
Group: None
>Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Mark Hammond (mhammond)
Assigned to: Mark Hammond (mhammond)
Summary: Fix test_pep277 on Win9x
Initial Comment:
In the interests of getting test_pep277 running for Tim
<wink>, sys.getwindowsversion() should be added. Chose
sys as that is where all other version related
information is found. Happy to move to the os module
is desired, but posixmodule.c is enough of a mess already.
Patch even includes doc :)
Martin, could you please review?
----------------------------------------------------------------------
Comment By: Mark Hammond (mhammond)
Date: 2002-10-08 04:47
Message:
Logged In: YES
user_id=14198
OK, all checked in, including a new enhanced
sys.getwindowsversion() that returns a tuple. Just don't
complain about the magic numbers <wink>
/cvsroot/python/python/dist/src/Python/sysmodule.c,v <--
sysmodule.c
new revision: 2.111; previous revision: 2.110
/cvsroot/python/python/dist/src/Doc/lib/libsys.tex,v <--
libsys.tex
new revision: 1.61; previous revision: 1.60
/cvsroot/python/python/dist/src/Doc/lib/libposixpath.tex,v
<-- libposixpath.tex
new revision: 1.29; previous revision: 1.28
/cvsroot/python/python/dist/src/Lib/dospath.py,v <--
dospath.py
new revision: 1.30; previous revision: 1.29
/cvsroot/python/python/dist/src/Lib/macpath.py,v <--
macpath.py
new revision: 1.40; previous revision: 1.39
/cvsroot/python/python/dist/src/Lib/ntpath.py,v <-- ntpath.py
new revision: 1.50; previous revision: 1.49
/cvsroot/python/python/dist/src/Lib/os2emxpath.py,v <--
os2emxpath.py
new revision: 1.7; previous revision: 1.6
/cvsroot/python/python/dist/src/Lib/posixpath.py,v <--
posixpath.py
new revision: 1.53; previous revision: 1.52
/cvsroot/python/python/dist/src/Lib/test/test_pep277.py,v
<-- test_pep277.py
new revision: 1.4; previous revision: 1.3
/cvsroot/python/python/dist/src/Lib/test/output/test_pep277,v
<-- test_pep277
new revision: 1.2; previous revision: 1.1
/cvsroot/python/python/dist/src/Misc/NEWS,v <-- NEWS
new revision: 1.495; previous revision: 1.494
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2002-10-06 16:17
Message:
Logged In: YES
user_id=21627
Right; that's os.path.supports_unicode_filenames.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2002-10-06 15:30
Message:
Logged In: YES
user_id=6380
But sys.path.supports_unicode_filenames was a typo, right?
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2002-10-06 14:18
Message:
Logged In: YES
user_id=21627
Mark wants it to be in sys; I have no preference in either
direction.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2002-10-06 13:53
Message:
Logged In: YES
user_id=6380
Did you mean sys, or os?
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2002-10-06 13:41
Message:
Logged In: YES
user_id=21627
Attached is a patch that uses getwindowsversion as I just
suggested. Back to Mark for comments and possible checkin.
The libsys.tex change also needs a \versionadded.
If sys.getwindowsversion remains signed, this patch must be
adjusted.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2002-10-06 09:25
Message:
Logged In: YES
user_id=21627
I'm in favour of adding sys.getwindowsversion.
As for disabling the test, it seems like Tim prefers to add
sys.path.supports_unicode_filenames, with the following
settings:
posixpath, macpath, dospath, os2emxpath: False
ntpath: getwindowsversion() < 0x80000000
I'm somewhat confused about the signedness of GetVersion(),
though - it appears that it is unsigned in C. If so, I think
the Python wrapper should also return non-negative numbers only.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=619108&group_id=5470