[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2018-04-18 Thread Mahmud Al Hasan
Mahmud Al Hasan added the comment: Thanks to Steve Dower the problem is solved! -- ___ Python tracker ___

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2018-04-17 Thread Steve Dower
Steve Dower added the comment: The attached files should work on Python 3.4. Feel free to use them. -- ___ Python tracker ___

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2018-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Does the problem still exist on Python 3.6? Python 3.4 is now in security fixes only mode. The only solution for you may be upgrading to Python 3.6. -- ___ Python tracker

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2018-04-17 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2018-04-17 Thread Mahmud Al Hasan
Mahmud Al Hasan added the comment: The problem still exists on python 3.4 and I need to use this version. Any solution? -- nosy: +rauaha versions: -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-09-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 23.09.2015 02:33, Steve Dower wrote: > > Done. Thanks. > As this is (meant to be) a purely informational/diagnostic module, seems like > a good idea to fix every version we're supporting in any way. Yep, that's the intention behind the platform

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-09-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset fa869ccf9368 by Steve Dower in branch '3.5': Issue #19143: platform module now reads Windows version from kernel32.dll to avoid compatibility shims. https://hg.python.org/cpython/rev/fa869ccf9368 New changeset 2f55d73e5ad6 by Steve Dower in branch

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-09-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset d8453733cc0c by Steve Dower in branch '2.7': Issue #19143: platform module now reads Windows version from kernel32.dll to avoid compatibility shims. https://hg.python.org/cpython/rev/d8453733cc0c -- nosy: +python-dev

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-09-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2f57270374f7 by Steve Dower in branch '3.4': Issue #19143: platform module now reads Windows version from kernel32.dll to avoid compatibility shims. https://hg.python.org/cpython/rev/2f57270374f7 -- ___

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-09-22 Thread Steve Dower
Steve Dower added the comment: Done. As this is (meant to be) a purely informational/diagnostic module, seems like a good idea to fix every version we're supporting in any way. -- assignee: -> steve.dower resolution: -> fixed stage: -> resolved status: open -> closed type: ->

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-09-16 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Steve: Could you please merge your changes into platform.py ? I think it should go into Python 2.7. -- ___ Python tracker

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-02-11 Thread Steve Dower
Steve Dower added the comment: The newer attachment should handle back to Windows 2000. Unfortunately, I have no machines to test this on, but all of the API calls existed at least on XP and the version numbers are correct. It runs correctly back to Python 2.7, works on 2.6 but gives the

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-02-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 09.02.2015 16:17, Steve Dower wrote: Steve Dower added the comment: Including the one shipped in the stdlib? Python 3.5 no longer supports XP. We normally have the platform.py module support multiple Python versions (at least that's how we did this

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-02-09 Thread Steve Dower
Steve Dower added the comment: Including the one shipped in the stdlib? Python 3.5 no longer supports XP. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19143 ___

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-02-09 Thread Steve Dower
Steve Dower added the comment: @Marc-Andre: Okay, I'll make it easier to backport. You're listed as maintainer - would you like me to post updates here and let you merge them in? @Mark - yep, I'm aware of that. That's how I know that 3.5 doesn't support XP anymore :) (I think we're even past

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-02-09 Thread Mark Lawrence
Mark Lawrence added the comment: @Steve just in case you didn't know the rules are given here https://www.python.org/dev/peps/pep-0011/#microsoft-windows. I find it a nuisance that you have to follow an external link to get the status of Python, but maybe it's the lesser of two evils? An

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-02-09 Thread Steve Dower
Steve Dower added the comment: (Was reminded about this by #23417) Any word on the back compat issues in platform.py? Can we make the version in 3.5 only work with Vista+, or do I need to handle XP in case someone takes the file onto an earlier Python version? --

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-02-09 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 09.02.2015 15:14, Steve Dower wrote: Steve Dower added the comment: (Was reminded about this by #23417) Any word on the back compat issues in platform.py? Can we make the version in 3.5 only work with Vista+, or do I need to handle XP in case

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-01-02 Thread eryksun
eryksun added the comment: if (not version.GetFileVersionInfoW(name, None, size, ver_block) or not ver_block): Arrays don't implement __bool__ and have fixed __len__, so ver_block is always True. You could look at ver_block[0] or ver_block.value (i.e. the C string value). --

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-01-02 Thread Steve Dower
Steve Dower added the comment: Thanks for the feedback. Updated the attachment with some other tidying too. -- Added file: http://bugs.python.org/file37586/win32_ver.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19143

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2015-01-02 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: Removed file: http://bugs.python.org/file37578/win32_ver.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19143 ___

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2014-12-31 Thread Steve Dower
Steve Dower added the comment: I've attached a replacement for the win32_ver function in platform.py that will get the actual version number from kernel32.dll's resources. Originally I was just writing a helper function, but it seemed easy enough to replace the entire function. The attached

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2014-12-31 Thread eryksun
eryksun added the comment: actual_len = kernel32.GetModuleFileNameW(kernel32._handle, name, len(name)) A module handle is the module's base address. kernel32 is loaded at a 32-bit base address in a 64-bit process, but I don't know whether that will always be true in current and future

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2014-06-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I don't have a Windows 8.1 handy, but if ver reports the correct version, why not have platform.win32_ver() use _syscmd_ver() in case the other APIs report 6.2.9200 and then have win32_ver() the higher version ?! FWIW: I don't think we should add anything

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2014-06-10 Thread Steve Dower
Steve Dower added the comment: The two 'correct' options are adding the manifest or doing nothing (based on a number of very passionate internal discussions I was able to dig up). Without the manifest, various APIs may behave differently - it's the new way that Windows decides whether to

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2014-06-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 10.06.2014 18:28, Steve Dower wrote: The one concession that the Windows dev is willing to make is for logging, in which case the version number should be read as a string from a standard DLL like kernel32.dll. This would be appropriate for

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2014-06-10 Thread Steve Dower
Steve Dower added the comment: So have platform.win32_ver() return the true version is acceptable ? Note that the platform module is meant for identifying the platform, not the runtime compatibility environment, so it has a slightly different target audience Yes, and that's exactly the

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2014-06-09 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: Finding the Windows version getting messier - Finding the Windows version getting messier (detect windows 8.1?) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19143

[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2014-06-09 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +steve.dower ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19143 ___ ___ Python-bugs-list