-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
more conservative setattr_cm broke mplcairo #17646
Copy link
Copy link
Closed
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Trying to run tight_layout with mplcairo broke since #17620 with
because the check
isinstance(cls_orig, types.FunctionType)fails for extension methods (such asGraphicsContextRendererCairo.<any method>). Looks like a better check is actually something likeisinstance(orig, types.MethodType) and hasattr(type(obj), attr)(the first isinstance check verifies thatorigis a bound method and then we just check that the attribute exists on the class and assume that if invoking the descriptor on it gives us a bound method, then we're good) -- at least it works for mplcairo...