Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Nov 19, 2024

If the timeout is larger than INT_MAX, replace it with INT_MAX, in
the poll() code path.

Add an unit test.
(cherry picked from commit b3687ad)

Co-authored-by: Victor Stinner [email protected]

…onGH-126968)

If the timeout is larger than INT_MAX, replace it with INT_MAX, in
the poll() code path.

Add an unit test.
(cherry picked from commit b3687ad)

Co-authored-by: Victor Stinner <[email protected]>
@Yhg1s
Copy link
Member

Yhg1s commented Dec 2, 2024

@vstinner this backport is broken because of a missing import of _testcapi, which exposes a different problem in the upstream change (where _testcapi is imported at the top level when it's available): the tests aren't skipped if _testcapi is None. Would you mind fixing that in main?

@vstinner
Copy link
Member

vstinner commented Dec 2, 2024

@vstinner this backport is broken because of a missing import of _testcapi, which exposes a different problem in the upstream change (where _testcapi is imported at the top level when it's available): the tests aren't skipped if _testcapi is None. Would you mind fixing that in main?

Alright, I wrote #127517 to fix the test in main.

@vstinner
Copy link
Member

vstinner commented Dec 2, 2024

I included my test_socket fix #127517 in this backport.

@vstinner
Copy link
Member

vstinner commented Dec 3, 2024

I included my test_socket fix #127517 in this backport.

Oh, I didn't notice that test_socket is very different in 3.12, it doesn't import _testcapi at the module level. I wrote the test differently to make it specific to CPython.

@vstinner vstinner merged commit b49e902 into python:3.12 Dec 3, 2024
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants