Skip to content

Regression for custom get_context() integrations (v2.4.0) #137

@rafaelbeckel

Description

@rafaelbeckel

Hey team, I had a custom integration working a few months ago, originally from this thread.

My lib uses get_context("fragmentcolor") and it worked perfectly for months.

I think a recent update 1 may have broken this contract, as running my lib with RenderCanvas now raises this error:

python main.py
Traceback (most recent call last):
  File "/Users/rafaelbeckel/LocalProjects/Python/fragmentcolor_example/main.py", line 30, in <module>
    target = renderer.create_target(canvas)
  File "/Users/rafaelbeckel/LocalProjects/Python/fragmentcolor_example/.venv/lib/python3.13/site-packages/rendercanvas/base.py", line 260, in get_context
    raise TypeError(
        "The given context type is invalid: {context_type!r} is not 'bitmap' or 'wgpu'."
    )
TypeError: The given context type is invalid: {context_type!r} is not 'bitmap' or 'wgpu'.

Should I do something differently for a custom Rust+Python integration now?

Best,
Rafael

Footnotes

  1. EDIT: v2.4.0 was the release that broke it; it still works with v2.3.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions