Skip to content

[MNT]: CI: either remove, or separate cairocffi CI paths #29822

Open
@jayaddison

Description

@jayaddison

Summary

The cairocffi dependency was added to (Travis) CI to support the pgi object bindings (0ed289c) that are no-longer-supported (3221c94).

However: cairocffi will still be used if cairo (e.g. pycairo) is unavailable at runtime:

try:
import cairo
if cairo.version_info < (1, 14, 0): # Introduced set_device_scale.
raise ImportError(f"Cairo backend requires cairo>=1.14.0, "
f"but only {cairo.version_info} is available")
except ImportError:
try:
import cairocffi as cairo
except ImportError as err:
raise ImportError(
"cairo backend requires that pycairo>=1.14.0 or cairocffi "
"is installed") from err

We currently install cairocffi during GitHub Actions CI unit testing; so there is a possibility that it would mask failures to import and exercise pycairo-based test coverage.

NB: This is my current understanding as I explore #29732 - I'm not 100% confident about my findings.

Proposed fix

Ideally, I think we should extract a separate cairocffi-based GitHub Actions CI unit test matrix job, so that both pycairo and cairocffi are exercised.

As a fallback if that proves infeasible, we could remove cairocffi from the dependencies installed during CI workflows.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions