Skip to content

fontlab_glyport.dependencies · declarations 001

Back to fontlab_glyport.dependencies

dependency_route

dependency_route(module: str) -> DependencyRoute

process_adapter

process_adapter(cancelled: Callable[[], bool], translate=None)

Provide bounded subprocess.run; Popen/shell modes require a host adapter.

Stdlib subprocess imports in unrelated host code retain their own module. A missing deadline fails before spawning instead of blocking the host loop.

request_service

request_service(url: str, *, timeout: float, cancelled: Callable[[], bool] = lambda: False, transport: Callable | None = None) -> bytes

Read HTTP incrementally with one deadline and cancellation between reads.

Injected two-argument transports own their blocking I/O. The default also bounds individual header/body socket reads by the remaining overall time.

run_process

run_process(argv: Sequence[str], *, timeout: float, cancelled: Callable[[], bool] = lambda: False, cwd: str | None = None) -> CompletedProcess

Run explicit argv without a shell; kill/reap on timeout, cancel or error.