Commit 659f2f0
Fix OSS fbthrift-python build failures
Summary:
1. Add missed closeable Extension and re-enable the thrift.python.streaming package in setup.py. The streaming package was disabled and the closeable.pyx Cython extension was never registered, which caused ModuleNotFoundError at import time.
2. Remove the unconditional enable_tests=ON from [cmake.defines.os=linux] in the fbthrift-python manifest. This override forced tests on during dependency builds even when --no-tests was passed, which triggered a find_package(benchmark) failure. Add benchmark as an explicit dependency so test builds resolve correctly.
3. Remove test_queue_timeout from client_server tests. The test is architecturally incompatible with thrift-python's async handler model: combinedHandler calls create_task() and returns instantly, so the C++ executor dequeues all requests and calls tryStartProcessing() before the 10ms queue timeout timer fires. No blocking in the Python handler can cause requests to sit in the C++ resource pool queue long enough for the timeout to trigger.
4. Fix test_flag_behavior_matrix for stdlib Flag on OSS Python 3.12. Python stdlib Flag.__contains__ does not support `0 in FlagType` on all Python 3.12 builds. Skip the 0-containment check for stdlib PyFlag subclasses — only test it for thrift-python Flag types.
5. Remove unused SocketAddress import from client_server.py (was only used by the deleted test_queue_timeout).
Reviewed By: vitaut
Differential Revision: D99921093
fbshipit-source-id: 82dd9f939b7617d0ed244088bea020178ee9f3ca1 parent 02a98af commit 659f2f0
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
0 commit comments