[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light

Issue 40650: Pytime.c doesn't need to include windows.h

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.

Messages (6) msg369082 - (view) Author: Minmin Gong (Minmin.Gong) * Date: 2020-05-16 23:30
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.
msg369265 - (view) Author: Steve Dower (steve.dower) * Date: 2020-05-18 16:21
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.
msg369266 - (view) Author: Steve Dower (steve.dower) * Date: 2020-05-18 16:22
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.
msg369267 - (view) Author: Steve Dower (steve.dower) * Date: 2020-05-18 16:22
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
msg369273 - (view) Author: miss-islington (miss-islington) Date: 2020-05-18 16:39
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
msg369274 - (view) Author: miss-islington (miss-islington) Date: 2020-05-18 16:42
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
History Date User Action Args 2020-05-18 16:42:21miss-islingtonsetmessages: + msg369274 2020-05-18 16:39:19miss-islingtonsetmessages: + msg369273 2020-05-18 16:23:14miss-islingtonsetnosy: + miss-islington

pull_requests: + pull_request19489

2020-05-18 16:23:13steve.dowersetstatus: open -> closed
nosy: - miss-islington

resolution: fixed
stage: patch review -> resolved

2020-05-18 16:23:07miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request19488
2020-05-18 16:23:00steve.dowersetmessages: + msg369267 2020-05-18 16:22:47steve.dowersetmessages: + msg369266 2020-05-18 16:21:34steve.dowersetmessages: + msg369265 2020-05-16 23:34:07Minmin.Gongsetkeywords: + patch
stage: patch review
pull_requests: + pull_request19443 2020-05-16 23:31:30Minmin.Gongsetnosy: + tim.golden, steve.dower, zach.ware, paul.moore

type: enhancement
components: + Windows
versions: + Python 3.9

2020-05-16 23:30:59Minmin.Gongcreate