Silence experimental coroutine deprecation warnings#150788
Conversation
zware
left a comment
There was a problem hiding this comment.
Looks fine to me, at least as a quick fix for a beta release :)
We recently got around this in CI by just disabling the UWP build entirely. I'm not up to date on whether we should just rip out the UWP entirely, but that might be an option for a permanent fix.
|
We can't rip it out entirely yet, since 3.13 is still going to the Store, but disabling that part of the build for our release process is the way I'd do it. Suppressing the warning is fine too, if it works. |
|
Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15. |
|
GH-150794 is a backport of this pull request to the 3.15 branch. |
| #if defined(__clang__) | ||
| #define _SILENCE_CLANG_COROUTINE_MESSAGE | ||
| #endif | ||
| #define _SILENCE_EXPERIMENTAL_COROUTINE_DEPRECATION_WARNINGS |
There was a problem hiding this comment.
This nicely fits the silence I had to already do a while ago for clang :)
#150794) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Zachary Ware <zach@python.org>
The Windows release build fails for today's 3.15 beta 2:
https://dev.azure.com/Python/cpython/_build/results?buildId=170819&view=logs&j=0108ec1a-385a-59f8-f3cd-2c3a968973ca&t=e19eaefe-6260-5118-3fc8-77764c035640
Here's Claude's summary, and it affects more than free-threaded debug AMD64. This PR does fix number 1.
Build: Azure Pipelines build 170819 (Python 3.15.0b2, free-threaded debug AMD64), 2026-06-02.
Symptom
python_uwp.vcxprojfails at the very end of the build:Root cause
Toolchain bump on the agent image — not a code regression.
static_assert)PC/python_uwp.cpptransitively pulls in<experimental/coroutine>via its<winrt/...>includes under/std:c++17. The file already silences the clang-equivalent warning but has no MSVC silencer.Why the toolchain changed
windows-release/azure-pipelines.yml:174(added in release-tools PR python/release-tools#346, Support optionallybuilding AMD64 with tailcalling) routes tail-calling builds to the
windows-2025-vs2026agent image,which ships VS 18:
Non-tailcall builds still go to the default
windows-2025(VS 2022) image and are unaffected.Fix options (upstream CPython, not release-tools)
_SILENCE_EXPERIMENTAL_COROUTINE_DEPRECATION_WARNINGStoPC/python_uwp.cpp(matching the existing clang silencer) or to the preprocessor defines in
PCbuild/python_uwp.vcxprojandPCbuild/pythonw_uwp.vcxproj./std:c++17to/std:c++20; modern C++/WinRT uses thestandard
<coroutine>header in C++20 mode.PCbuild/_wmi.vcxprojis already on C++20.Workaround to ship now
Queue the release build without
DoTailCalling=trueso it lands on the VS 2022 agent.