mobile: re-add Python APIs#43605
Conversation
…envoyproxy#43514) Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
|
CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to |
|
/assign @abeyad |
Signed-off-by: Dan Zhang <danzh@google.com>
|
Thanks @danzh2010 ! Question: do we know if any existing CI workflow actually executes the Python tests? If not, should we add it here? |
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
|
please review the black dep changes. /assign @phlax |
|
/assign @phlax |
| setattr(destination, attr, val) | ||
| except Exception as e: | ||
| print(f"Error copying attribute {attr}: {e}") | ||
| except Exception as e: |
There was a problem hiding this comment.
most linters wont allow this - you need to be more specific about what type of error
There was a problem hiding this comment.
wouldn't we want a catch-all for try block?
There was a problem hiding this comment.
generally you dont want to catch a bare exception - just named ones
There was a problem hiding this comment.
the reason being - on unexpected failure the program should fail - so if you catch something the more specific the better ... also because you might catch things you had not expected to
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
|
/retest |
| return self.setOnEngineExit([shared_closure]() { | ||
| py::gil_scoped_acquire acquire; | ||
| (*shared_closure)(); | ||
| }); |
There was a problem hiding this comment.
FWIW, I don't know enough Python myself to know if this is the proper use of the GIL scope etc, but I'm just trusting the AI got it right :)
Signed-off-by: Dan Zhang <danzh@google.com>
phlax
left a comment
There was a problem hiding this comment.
python looks loads better, thanks @danzh2010
(not sure about the pybind stuff - didnt review it as dont have much experience with it)
|
/retest |
1 similar comment
|
/retest |
abeyad
left a comment
There was a problem hiding this comment.
LGTM, thanks @danzh2010 !
Signed-off-by: Dan Zhang <danzh@google.com>
tested wf breakout from envoyproxy#43605 renames wfs for consistency (android tests etc are soon going to be ~merged into Mobile/Android eg) Signed-off-by: Ryan Northey <ryan@synca.io> Signed-off-by: bjmask <11672696+bjmask@users.noreply.github.com>
Re-adds Python bindings targeting the current C++ API surface (EngineBuilder, Engine, StreamClient, StreamPrototype, Stream) using pybind11. Includes GIL-safe callback shims, Python dict/bytes type conversions, a fetch client example, and an integration test. Patched from envoyproxy#43514 Co-Authored-By: Claude [noreply@anthropic.com](mailto:noreply@anthropic.com) Co-Authored-By: Gemini CLI Risk Level: low, no change to existing APIs and features Testing: new tests added Docs Changes: N/A Release Notes: N/A Platform Specific Features: N/A --------- Signed-off-by: Dan Zhang <danzh@google.com> Co-authored-by: Dan Zhang <danzh@google.com> Signed-off-by: bjmask <11672696+bjmask@users.noreply.github.com>
tested wf breakout from envoyproxy#43605 renames wfs for consistency (android tests etc are soon going to be ~merged into Mobile/Android eg) Signed-off-by: Ryan Northey <ryan@synca.io>
Re-adds Python bindings targeting the current C++ API surface (EngineBuilder, Engine, StreamClient, StreamPrototype, Stream) using pybind11. Includes GIL-safe callback shims, Python dict/bytes type conversions, a fetch client example, and an integration test. Patched from envoyproxy#43514 Co-Authored-By: Claude [noreply@anthropic.com](mailto:noreply@anthropic.com) Co-Authored-By: Gemini CLI Risk Level: low, no change to existing APIs and features Testing: new tests added Docs Changes: N/A Release Notes: N/A Platform Specific Features: N/A --------- Signed-off-by: Dan Zhang <danzh@google.com> Co-authored-by: Dan Zhang <danzh@google.com>
tested wf breakout from envoyproxy#43605 renames wfs for consistency (android tests etc are soon going to be ~merged into Mobile/Android eg) Signed-off-by: Ryan Northey <ryan@synca.io>
Re-adds Python bindings targeting the current C++ API surface (EngineBuilder, Engine, StreamClient, StreamPrototype, Stream) using pybind11. Includes GIL-safe callback shims, Python dict/bytes type conversions, a fetch client example, and an integration test. Patched from envoyproxy#43514 Co-Authored-By: Claude [noreply@anthropic.com](mailto:noreply@anthropic.com) Co-Authored-By: Gemini CLI Risk Level: low, no change to existing APIs and features Testing: new tests added Docs Changes: N/A Release Notes: N/A Platform Specific Features: N/A --------- Signed-off-by: Dan Zhang <danzh@google.com> Co-authored-by: Dan Zhang <danzh@google.com>
tested wf breakout from envoyproxy#43605 renames wfs for consistency (android tests etc are soon going to be ~merged into Mobile/Android eg) Signed-off-by: Ryan Northey <ryan@synca.io>
Re-adds Python bindings targeting the current C++ API surface (EngineBuilder, Engine, StreamClient, StreamPrototype, Stream) using pybind11. Includes GIL-safe callback shims, Python dict/bytes type conversions, a fetch client example, and an integration test. Patched from envoyproxy#43514 Co-Authored-By: Claude [noreply@anthropic.com](mailto:noreply@anthropic.com) Co-Authored-By: Gemini CLI Risk Level: low, no change to existing APIs and features Testing: new tests added Docs Changes: N/A Release Notes: N/A Platform Specific Features: N/A --------- Signed-off-by: Dan Zhang <danzh@google.com> Co-authored-by: Dan Zhang <danzh@google.com>
Re-adds Python bindings targeting the current C++ API surface (EngineBuilder, Engine, StreamClient, StreamPrototype, Stream) using pybind11. Includes GIL-safe callback shims, Python dict/bytes type conversions, a fetch client example, and an integration test.
Patched from #43514
Co-Authored-By: Claude noreply@anthropic.com
Co-Authored-By: Gemini CLI
Risk Level: low, no change to existing APIs and features
Testing: new tests added
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A