Skip to content

Commit 659f2f0

Browse files
Satish Kumarmeta-codesync[bot]
authored andcommitted
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: 82dd9f939b7617d0ed244088bea020178ee9f3ca
1 parent 02a98af commit 659f2f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

build/fbcode_builder/manifests/fbthrift-python

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ enable_tests=OFF
2828

2929
[cmake.defines.os=linux]
3030
thrift_python=ON
31-
enable_tests=ON
3231

3332
[dependencies]
33+
benchmark
3434
fizz-python
3535
fmt-python
3636
folly-python

0 commit comments

Comments
 (0)