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: Fix test_pep277 on Win9x
Type: Stage:
Components: Windows Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: mhammond Nosy List: gvanrossum, loewis, mhammond
Priority: normal Keywords: patch

Created on 2002-10-06 01:13 by mhammond, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
getversion.patch mhammond, 2002-10-06 01:13 Adds sys.getwindowsversion and fixes test_pep277
suf.txt loewis, 2002-10-06 11:41
Messages (8)
msg41335 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2002-10-06 01:13
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?
msg41336 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-10-06 07:25
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.
msg41337 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-10-06 11:41
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.
msg41338 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-10-06 11:53
Logged In: YES 
user_id=6380

Did you mean sys, or os?
msg41339 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-10-06 12:18
Logged In: YES 
user_id=21627

Mark wants it to be in sys; I have no preference in either
direction.
msg41340 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-10-06 13:30
Logged In: YES 
user_id=6380

But sys.path.supports_unicode_filenames was a typo, right?
msg41341 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-10-06 14:17
Logged In: YES 
user_id=21627

Right; that's os.path.supports_unicode_filenames.
msg41342 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2002-10-08 02:47
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
History
Date User Action Args
2022-04-10 16:05:43adminsetgithub: 37268
2002-10-06 01:13:44mhammondcreate