This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Pytime.c doesn't need to include windows.h
Type: enhancement Stage: resolved
Components: Windows Versions: Python 3.9
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Minmin.Gong, miss-islington, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2020-05-16 23:30 by Minmin.Gong, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 20137 merged Minmin.Gong, 2020-05-16 23:34
PR 20187 merged miss-islington, 2020-05-18 16:23
PR 20188 merged miss-islington, 2020-05-18 16:23
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) * (Python committer) Date: 2020-05-18 16:21
Missing piece of information, it's also _documented_ as being part of the winsock headers:

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) * (Python committer) 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) * (Python committer) 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)
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)
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)
Date User Action Args
2022-04-11 14:59:31adminsetgithub: 84830
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