Skip to content

gh-108765: Python.h no longer includes <sys/time.h> - #108775

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:include_time
Sep 2, 2023
Merged

gh-108765: Python.h no longer includes <sys/time.h>#108775
vstinner merged 1 commit into
python:mainfrom
vstinner:include_time

Conversation

@vstinner

@vstinnervstinner commented Sep 1, 2023

Copy link
Copy Markdown
Member

Python.h no longer includes these standard header files: <time.h>, <sys/select.h> and <sys/time.h>. They should now be included explicitly if needed.


📚 Documentation preview 📚: https://cpython-previews--108775.org.readthedocs.build/

Python.h no longer includes <time.h>, <sys/select.h> and <sys/time.h>
standard header files.
* Add <time.h> include to xxsubtype.c.
* Add <sys/time.h> include to posixmodule.c and semaphore.c.
* readline.c includes <sys/select.h> instead of <sys/time.h>.
* resource.c no longer includes <time.h> and <sys/time.h>.
@vstinner

Copy link
Copy Markdown
MemberAuthor

I merged my PR.

If it causes too many trouble in 3rd party C extensions (require to update too many C extensions before Python 3.13 beta1), I can make this change conditional only in the limited C API version 3.13.

See also my PR removing <unistd.h>: PR #108783.

@vstinner
vstinner merged commit e7de0c5 into python:mainSep 2, 2023
@vstinner
vstinner deleted the include_time branch September 2, 2023 15:51
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@vstinner@bedevere-bot