Created on 2020-05-16 23:30 by Minmin.Gong, last changed 2020-05-18 16:42 by miss-islington. This issue is now closed.
Python/pytime.c includes windows.h for timeval. But it's not necessary to include the full header, because timeval is defined in winsock headers.
Missing piece of information, it's also _documented_ as being part of the winsock headers: https://docs.microsoft.com/en-us/windows/win32/api/winsock/ns-winsock-timeval Plenty of things get included inadvertently, but they can't be relied upon. In this case it seems like an okay change.
Also, for future reference, compile-only changes typically don't require a NEWS entry (since users are not going to be interested in reading it in the changelog, and we have commit messages for developers). We have the ability to skip the requirement on the PR, so feel free to just ignore the failure until we get to take a look.
New changeset f660567937277cc3a2cd53af77bbb18e905427e8 by Minmin Gong in branch 'master': bpo-40650: Include winsock2.h in pytime.c, instead of a full windows.h (GH-20137) https://github.com/python/cpython/commit/f660567937277cc3a2cd53af77bbb18e905427e8
New changeset 8e49c1fcf15969ca5c585648a5520617cc0566e6 by Miss Islington (bot) in branch '3.7': bpo-40650: Include winsock2.h in pytime.c, instead of a full windows.h (GH-20137) https://github.com/python/cpython/commit/8e49c1fcf15969ca5c585648a5520617cc0566e6
New changeset ab9d9535aad5e627cb9ae471f186e27a65e48c6e by Miss Islington (bot) in branch '3.8': bpo-40650: Include winsock2.h in pytime.c, instead of a full windows.h (GH-20137) https://github.com/python/cpython/commit/ab9d9535aad5e627cb9ae471f186e27a65e48c6e
pull_requests: + pull_request19489
resolution: fixed
stage: patch review -> resolved
type: enhancement
components:
+ Windows
versions:
+ Python 3.9