Skip to content

Conversation

urban233
Copy link
Owner

@urban233 urban233 commented Sep 9, 2025

This pull request introduces a major update to PyMOL's remote control capabilities by replacing the legacy XML-RPC interface with a new, modern gRPC-based service. This improves security, performance, and maintainability, and is accompanied by the addition of protocol buffer definitions and generated Python code for the gRPC API. The workflow for building wheels is also updated to better support multiple branches.

Remote control API modernization

  • Added a new gRPC server implementation in modules/pymol/pml_grpc.py, providing a comprehensive set of remote control methods for PyMOL, including molecular visualization commands, object manipulation, and compatibility methods for legacy workflows.
  • Introduced protocol buffer definitions for the gRPC API in proto/pymol_rpc.proto, specifying all request/response message types and the PyMolRPC service interface.
  • Added generated Python protobuf code in modules/pymol/pymol_rpc_pb2.py to support serialization and deserialization for the gRPC service.

Security and transition improvements

  • Updated the PyMOL invocation logic in modules/pymol/invocation.py to enforce the use of gRPC for remote control, deprecating the insecure XML-RPC implementation and documenting the associated vulnerabilities.

Build workflow enhancements

  • Modified the wheel build workflow in .github/workflows/wheels.yaml to trigger on additional branches (production, main, incubating) and on pull requests, improving CI coverage for the new remote control features.

Introduced a new gRPC-based implementation to replace the deprecated XML-RPC framework used in PyMOL. This migration addresses security vulnerabilities in XML-RPC (e.g., CVE-2016-5004) and provides a modern, efficient, and extensible framework for remote procedure calls. Updated associated protobuf definitions and Python gRPC bindings accordingly.
Updated the CI workflow to trigger on pushes to the "production" branch and pull requests targeting "main," "production," or "incubating." This ensures proper testing coverage for additional branches and improves development workflow consistency.
@urban233 urban233 self-assigned this Sep 9, 2025
@urban233 urban233 added the enhancement New feature or request label Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant