GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-144679: When building with VS2026 on Windows, use PlatformToolSet v145 by default by chris-eibl · Pull Request #144680 · python/cpython

Conversation

@chris-eibl

@chris-eibl chris-eibl commented Feb 10, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Furthermore do not warn when PlatformToolSet v145 is used.

  • Issue: When building with VS2026 on Windows, use PlatformToolSet v145 by default #144679

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
chris-eibl added 2 commits February 10, 2026 18:23
@chris-eibl
Use PlatformToolSet v145 by default when building with VS 2026
839e029
Furthermore, do not warn anymore when building with v145
@chris-eibl
Blurb it.
0f803d4
@chris-eibl
chris-eibl requested a review from a team as a code owner February 10, 2026 17:29
@bedevere-app bedevere-app Bot added the awaiting review label Feb 10, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Feb 10, 2026
When building with VS2026 on Windows, use PlatformToolSet v145 by default #144679
Closed
@chris-eibl chris-eibl added OS-windows build The build process and cross-build labels Feb 10, 2026
chris-eibl
chris-eibl commented Feb 10, 2026
View reviewed changes
Comment thread PCbuild/pythoncore.vcxproj Outdated
</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'">

@chris-eibl chris-eibl Feb 10, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Wulian233 Wulian233 Feb 10, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chris-eibl reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@zooba zooba Feb 11, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chris-eibl reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@chris-eibl chris-eibl Feb 12, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@zooba zooba Feb 12, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chris-eibl reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@chris-eibl chris-eibl Feb 12, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
zooba
zooba approved these changes Feb 11, 2026
View reviewed changes

@zooba zooba left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this 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)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Feb 11, 2026
@chris-eibl
warn for older tool sets
3e4dccb
@chris-eibl

chris-eibl commented Feb 12, 2026

Copy link
Copy Markdown
Member Author

I did not yet touch

cpython/Tools/msi/bundle/bootstrap/pythonba.vcxproj

Lines 24 to 25 in 46d5106

<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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zooba

zooba commented Feb 12, 2026

Copy link
Copy Markdown
Member

But adding v145 here would be no harm?

Uh, it might be. I think we need to match the versions supported by WiX, which probably don't extend to v145. Try it - it should run in CI when you touch the file - but be prepared to change it to use v143.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl
use v145 in pythonba.vcxproj
dbb0487
@chris-eibl

chris-eibl commented Feb 12, 2026

Copy link
Copy Markdown
Member Author

Ok, let's try. In case it fails when switching CI to windows-2025-vs2026, I'll revert back ...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zooba

zooba commented Feb 12, 2026

Copy link
Copy Markdown
Member

FYI, this is the line that matters:

https://github.com/python/cpython/actions/runs/21963900630/job/63448457298?pr=144680#step:3:5827

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\bin\HostX86\x86\link.exe /ERRORREPORT:QUEUE /OUT:"D:\a\cpython\cpython\PCbuild\obj\315win32_Release\msi_pythonba\PythonBA.dll" /NOLOGO /LIBPATH:"D:\a\cpython\cpython\externals\windows-installer\wix-314\sdk\vs2017\lib\x86" comctl32.lib gdiplus.lib msimg32.lib shlwapi.lib wininet.lib dutil.lib balutil.lib version.lib uxtheme.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /DEF:"pythonba.def" /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG:FULL /PDB:"D:\a\cpython\cpython\PCbuild\obj\315win32_Release\msi_pythonba\PythonBA.pdb" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:\a\cpython\cpython\PCbuild\obj\315win32_Release\msi_pythonba\PythonBA.lib" /MACHINE:X86 /SAFESEH /DLL D:\a\cpython\cpython\PCbuild\obj\315win32_Release\msi_pythonba\PythonBootstrapperApplication.obj

Most critical, the MSVC version (14.44.35207 here) and the libpath ("D:\a\cpython\cpython\externals\\windows-installer\wix-314\sdk\vs2017\lib\x86" here). That path will contain a static library, which has to match the compiler version. Apparently this one does, despite being labelled vs2017, so I'm not actually sure what magic is going on here - possibly the compiler team figured out a way to make them forward compatible?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl

chris-eibl commented Feb 13, 2026

Copy link
Copy Markdown
Member Author

Thanks for that hint. So I ran

tools\msi\build.bat --doc -x64

locally for this PR. It did use VS2026 / v145 and finished without an error. Here is the relevant part of the build log

C:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.50.35717\bin\HostX86\x86\link.exe /ERRORREPORT:QUEUE /OUT:"e:\cpython\PCbuild\obj\315win32_Release\msi_pythonba\PythonBA.dll" /NOLOGO /LIBPATH:"e:\cpython\externals\windows-installer\wix-314\sdk\vs2017\lib\x86" comctl32.lib gdiplus.lib msimg32.lib shlwapi.lib wininet.lib dutil.lib balutil.lib version.lib uxtheme.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /DEF:"pythonba.def" /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG:FULL /PDB:"e:\cpython\PCbuild\obj\315win32_Release\msi_pythonba\PythonBA.pdb" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"e:\cpython\PCbuild\obj\315win32_Release\msi_pythonba\PythonBA.lib" /MACHINE:X86 /SAFESEH /DLL e:\cpython\PCbuild\obj\315win32_Release\msi_pythonba\Python BootstrapperApplication.obj

VS2026 linked fine against balutil.lib contained in e:\cpython\externals\\windows-installer\wix-314\sdk\vs2017\lib\x86

so I'm not actually sure what magic is going on

Same here: sounds scary. But seems to be forward compatible according to https://learn.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=msvc-170

Binaries created with different versions of the v140, v141, v142, v143, and v145 build tools can be combined. The key rule is that the linker should only work with inputs built by build tools that are the same version (or earlier) as itself.[...]

So I think it is ok. Given also that 3.13 and 3.14 did the same using VS2022 and there are no reported problems?

zooba reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zooba

zooba commented Feb 16, 2026

Copy link
Copy Markdown
Member

Yep, sounds like it's okay.

Any other changes coming for this PR?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl

chris-eibl commented Feb 16, 2026

Copy link
Copy Markdown
Member Author

Nope, that's it for this one :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner mentioned this pull request Feb 16, 2026
test_dtrace fails on Windows Server 2025 #138744
Closed
@chris-eibl

chris-eibl commented Feb 19, 2026

Copy link
Copy Markdown
Member Author

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

@zooba: friendly ping. I think this is ready to merge.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zooba
zooba merged commit c06f4f4 into python:main Feb 19, 2026
49 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Feb 19, 2026
@chris-eibl

chris-eibl commented Feb 19, 2026

Copy link
Copy Markdown
Member Author

Should we backport this aften an observation period on main?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl
chris-eibl deleted the vs2026 branch February 19, 2026 15:32
@chris-eibl chris-eibl mentioned this pull request Feb 19, 2026
GH-144679: MSVC tailcall CI no longer needs to specify PlatformToolset #145004
Merged
@zooba

zooba commented Feb 19, 2026

Copy link
Copy Markdown
Member

Yes but the "observation period" includes a couple of releases of 3.15. We want actual feedback from users, not just CI stability.

chris-eibl reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

brijkapadia pushed a commit to brijkapadia/cpython that referenced this pull request Feb 28, 2026
@chris-eibl @brijkapadia
pythonGH-144679: When building with VS 2026 on Windows, use PlatformT…
8174d4e
…oolset v145 by default (pythonGH-144680)
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@chris-eibl @ljfp
pythonGH-144679: When building with VS 2026 on Windows, use PlatformT…
568bd59
…oolset v145 by default (pythonGH-144680)
@chris-eibl chris-eibl mentioned this pull request Jun 24, 2026
Use windows-2025 in GitHub Actions #150605
Closed
d-rotanov-rogii added a commit to rogii-com/cpython that referenced this pull request Sep 24, 2026
@d-rotanov-rogii
STARSTEER-28862 Port VS 2026 toolset selection from upstream CPython:…
f1bc45b
… VisualStudioVersion 18.0 -> PlatformToolset v145 (pythonGH-138980, pythonGH-144680)
@StanFromIreland StanFromIreland added the needs backport to 3.14 bugs and security fixes label Sep 25, 2026
@miss-islington-app

miss-islington-app Bot commented Sep 25, 2026

Copy link
Copy Markdown

Thanks @chris-eibl for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app

bedevere-app Bot commented Sep 25, 2026

Copy link
Copy Markdown

GH-158188 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Sep 25, 2026
@StanFromIreland

StanFromIreland commented Sep 25, 2026

Copy link
Copy Markdown
Member

(I'll post details on backport.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chris-eibl chris-eibl mentioned this pull request Sep 25, 2026
[3.14] GH-144679: When building with VS 2026 on Windows, use PlatformToolset v145 by default (GH-144680) #158188
Merged
pablogsal pushed a commit that referenced this pull request Sep 25, 2026
@miss-islington @chris-eibl
@hugovk @zware
[3.14] GH-144679: When building with VS 2026 on Windows, use Platform…
2649b37
…Toolset v145 by default (GH-144680) (#158188)

* GH-144679: When building with VS 2026 on Windows, use PlatformToolset v145 by default (GH-144680)
(cherry picked from commit c06f4f4)

Co-authored-by: Chris Eibl <[email protected]>

* Silence experimental coroutine deprecation warnings (#150788)

Co-authored-by: Zachary Ware <[email protected]>
(cherry picked from commit 7241db1)

---------

Co-authored-by: Chris Eibl <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Zachary Ware <[email protected]>
@d-rotanov-rogii d-rotanov-rogii mentioned this pull request Oct 2, 2026
STARSTEER-28862 Build with VS 2026 toolchain (MSVC 14.51.36231, SDK 10.0.26100.0) rogii-com/cpython#59
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@zooba zooba zooba approved these changes
+1 more reviewer
@Wulian233 Wulian233 Wulian233 left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

build The build process and cross-build OS-windows

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@chris-eibl @zooba @StanFromIreland @Wulian233
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.