Patches item #1620174, was opened at 2006-12-21 15:49
Message generated for change (Comment added) made by lemburg
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1620174&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Luke Dunstan (infidel)
Assigned to: M.-A. Lemburg (lemburg)
Summary: Improve platform.py usability on Windows

Initial Comment:
This patch modifies platform.py to remove most of the dependencies on pywin32, 
and use the standard ctypes and _winreg modules instead. It also adds support 
for Windows CE.


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

>Comment By: M.-A. Lemburg (lemburg)
Date: 2007-06-12 11:33

Message:
Logged In: YES 
user_id=38388
Originator: NO

Please update the patch to:

 * not change the APIs of public interfaces

 * support both the win32 extension and the combination _winreg and
ctypes

 * work on all Python versions since Python 1.5.2

Otherwise, I'll have to reject the patch.

Thanks.


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

Comment By: M.-A. Lemburg (lemburg)
Date: 2007-01-14 00:21

Message:
Logged In: YES 
user_id=38388
Originator: NO

platform.py is used outside the Python distribution to check which Python
version is being used (among other things).

It has to run with Python versions as early as 1.5.2.

That said, it's OK to have it use different ways of accessing the needed
information, provided that the signatures and return values of the public
APIs don't change.


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

Comment By: Luke Dunstan (infidel)
Date: 2007-01-01 07:25

Message:
Logged In: YES 
user_id=30442
Originator: YES

Why does platform.py need to be compatible with earlier versions of
Python?

The return types haven't changed, and I think the return values won't
change because the same OS APIs are being used.


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

Comment By: M.-A. Lemburg (lemburg)
Date: 2006-12-31 19:49

Message:
Logged In: YES 
user_id=38388
Originator: NO

I haven't looked at the patch yet, so just a few general comments on
changes to platform.py:

* the code must continue to work with Python versions prior to 2.6

  This means that ctypes and _winreg support may be added as an option,
but 
  removing pywin32 calls is not the right way to proceed.

* changes in return type of the public and documented APIs are not
possible

  If you have a need for more information, then a new API should be
added,
  or the information merged into one of the existing return fields.

* changes in the return values of APIs due to use of different OS APIs
must
  be avoided

  There's code out there relying on the return values, so if in doubt a
new
  API must be provided.


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

Comment By: Luke Dunstan (infidel)
Date: 2006-12-31 06:57

Message:
Logged In: YES 
user_id=30442
Originator: YES

1. Yes this is intended for 2.6

2. The only difference between win32api.RegQueryValueEx and
_winreg.QueryValueEx seems to be that the latter returns Unicode strings. I
have adjusted the patch to be more compatible with the old behaviour.

3. I have updated the doc string in the new patch.

File Added: platform-wince-2.diff

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

Comment By: Jim Jewett (jimjjewett)
Date: 2006-12-31 01:13

Message:
Logged In: YES 
user_id=764593
Originator: NO


( win32api.RegQueryValueEx is _winreg.QueryValueEx ) ?

If not, it should wait for 2.6, and there should be an entry in what's
new.  (I suppose similar concerns exist for other return classes.)

The change to win32_ver only half-corrects the return type to the
four-tuple.  The meaning of release (even if it is just "release name")
should be specified in the text.


 def win32_ver(release='',version='',csd='',ptype=''):
 
     """ Get additional version information from the Windows Registry
-        and return a tuple (version,csd,ptype) referring to version
+        and return a tuple (release,version,csd,ptype) referring to
version
         number, CSD level and OS type (multi/single
         processor).



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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1620174&group_id=5470
_______________________________________________
Patches mailing list
Patches@python.org
http://mail.python.org/mailman/listinfo/patches

Reply via email to