Skip to content

GH-144679: When building with VS2026 on Windows, use PlatformToolSet v145 by default#144680

Open
chris-eibl wants to merge 3 commits intopython:mainfrom
chris-eibl:vs2026
Open

GH-144679: When building with VS2026 on Windows, use PlatformToolSet v145 by default#144680
chris-eibl wants to merge 3 commits intopython:mainfrom
chris-eibl:vs2026

Conversation

@chris-eibl
Copy link
Member

@chris-eibl chris-eibl commented Feb 10, 2026

Furthermore do not warn when PlatformToolSet v145 is used.

Furthermore, do not warn anymore when building with v145
</ItemGroup>
</Target>
<Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v141' and $(PlatformToolset) != 'v142' and $(PlatformToolset) != 'v143'">
<Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v141' and $(PlatformToolset) != 'v142' and $(PlatformToolset) != 'v143' and $(PlatformToolset) != 'v145'">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On main, shall we warn for older toolsets like v141 or v142 now?

Likewise, shall we keep a warning for v145 on 3.13 / 3.14?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The minimum VS version for building Python now is 2017.
https://docs.python.org/3.15/using/configure.html

I removed the support for 2015 a year ago #124103 . However, according to the Mainstream End Date of the VS lifecycle, currently only VS2022 is still supported

https://learn.microsoft.com/lifecycle/products/visual-studio-2019

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, let's start warning for those older ones.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The minimum VS version for building Python now is 2017.
https://docs.python.org/3.15/using/configure.html

Maybe we should change that to 2022 since we emit a warning for the older ones now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not required though, whereas I'm pretty sure we made changes that prevent using the compilers that came with VS 2015. If you want to write something that's clearer about the "works with" toolset version, the "released/supported with" toolset versions, and the VS versions that typically include these toolsets (newer VS should have older MSVC available as options, but not selected by default), feel free.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, got it now, thanks for the explanation. So no need to change that from my point of view, until in the future we do a change that requires a newer version than VS 2017.

Copy link
Member

@zooba zooba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with change in comments (ping me if nobody else merges)

@chris-eibl
Copy link
Member Author

I did not yet touch

<PlatformToolset Condition="'$(PlatformToolset)' == '' and '$(VisualStudioVersion)' == '17.0'">v143</PlatformToolset>
<PlatformToolset Condition="'$(PlatformToolset)' == '' and '$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>

since this seems to be related to the deprecated msi installers. But adding v145 here would be no harm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge build The build process and cross-build OS-windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants