Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Sep 2, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 1, 2023

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 vstinner marked this pull request as ready for review September 2, 2023 15:07
@vstinner
Copy link
Member Author

vstinner commented Sep 2, 2023

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:main Sep 2, 2023
@vstinner vstinner deleted the include_time branch September 2, 2023 15:51
Sign up for free to 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