Skip to content

[sdk-drift] stopServer/restartServer are permanent first-class API in TypeScript but deprecated in Python #702

@realfishsam

Description

@realfishsam

SDK Drift: stopServer / restartServer — permanent API (TypeScript) vs deprecated (Python)

Summary

pmxt.stopServer() and pmxt.restartServer() are documented as permanent, fully-supported top-level aliases in TypeScript. The equivalent pmxt.stop_server() and pmxt.restart_server() in Python emit a DeprecationWarning directing callers to use pmxt.server.stop() and pmxt.server.restart() instead.


TypeScript

File: sdks/typescript/index.ts, lines 39–47

// Flat aliases for the namespaced server commands. Kept as permanent,
// fully-supported shorthand — `pmxt.server.stop()` and `pmxt.stopServer()`
// are equivalent and both are first-class API.
export const stopServer = server.stop.bind(server);
export const restartServer = server.restart.bind(server);

The comment is explicit: these are not deprecated; they are "permanent, fully-supported shorthand."


Python

File: sdks/python/pmxt/__init__.py, lines 111–131

def stop_server():
    warnings.warn(
        "stop_server() is deprecated, use pmxt.server.stop() instead",
        DeprecationWarning,
        stacklevel=2,
    )
    return server.stop()

def restart_server():
    warnings.warn(
        "restart_server() is deprecated, use pmxt.server.restart() instead",
        DeprecationWarning,
        stacklevel=2,
    )
    return server.restart()

Impact

  • Code written against the TypeScript SDK using pmxt.stopServer() / pmxt.restartServer() is correct and forward-compatible.
  • Equivalent code written against the Python SDK using pmxt.stop_server() / pmxt.restart_server() produces deprecation warnings and may break in a future release.
  • Cross-language documentation, examples, and tutorials that show the flat alias pattern will generate warnings for Python users.
  • The API stability contract is inconsistent: TypeScript users can rely on these aliases; Python users cannot.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions