[3.12] gh-126876: Fix socket internal_select() for large timeout (GH-126968)#127003
[3.12] gh-126876: Fix socket internal_select() for large timeout (GH-126968)#127003vstinner merged 4 commits intopython:3.12from
Conversation
…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 <vstinner@python.org>
|
@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. |
…capi (python#127517) (cherry picked from commit c46acd3)
|
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 |
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 vstinner@python.org
socketwith too large default timeout (larger than INT_MAX) #126876