bpo-32592: Remove Vista code from os.cpu_count() by vstinner · Pull Request #11457 · python/cpython (original) (raw)

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation5 Commits1 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

vstinner

@vstinner

Remove code specific to Windows Vista from os.cpu_count(): Python requires Windows 7 or newer.

@vstinner

Ah. Compilation failed on "Windows PR Tests win32" of Azure Pipelines PR:

2019-01-07T15:02:40.9331567Z d:\a\1\s\modules\posixmodule.c(11823): warning C4013: 'GetMaximumProcessorCount' undefined; assuming extern returning int [D:\a\1\s\PCbuild\pythoncore.vcxproj]

... but it pass on "Windows PR Tests win64".

Extract of pythoninfo on "Windows PR Tests win32" from a different PR:

@zooba

That is a very strange error to get... I can't think of any reason other than a corrupt incremental build, but we don't do incremental builds here.

Perhaps the rebuild when you add a NEWS entry will work?

@vstinner

On IRC, @zware told me:

Looks like you need to set Py_WINVER to 0x0601 in PC/pyconfig.h

It tried to avoid puting this change in this PR to get a PR as small as possible, but it seems like it's not enough.

Note: I already failed to understand such failure in the past: https://bugs.python.org/issue32592#msg318103 Windows is still full of mystery for me :-)

eamanu

auvipy

@zooba

@vstinner Zachary is correct. You'll need to get that first change in before any of the rest will succeed reliably.

I'm okay with reviewing all of the changes together if it's simpler for you to do one PR. But the WINVER update is the critical part.

@vstinner

I don't understand how to remove Vista support. I give up on this PR. If someone else is interested, please go ahead and write a new PR :-)