Title: more conservative setattr_cm broke mplcairo · Issue #17646 · matplotlib/matplotlib · GitHub
Open Graph Title: more conservative setattr_cm broke mplcairo · Issue #17646 · matplotlib/matplotlib
X Title: more conservative setattr_cm broke mplcairo · Issue #17646 · matplotlib/matplotlib
Description: Trying to run tight_layout with mplcairo broke since #17620 with ValueError: trying to set draw_gouraud_triangles which is not a method, property, or instance level attribute because the check isinstance(cls_orig, types.FunctionType) fai...
Open Graph Description: Trying to run tight_layout with mplcairo broke since #17620 with ValueError: trying to set draw_gouraud_triangles which is not a method, property, or instance level attribute because the check isin...
X Description: Trying to run tight_layout with mplcairo broke since #17620 with ValueError: trying to set draw_gouraud_triangles which is not a method, property, or instance level attribute because the check isin...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/17646
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"more conservative setattr_cm broke mplcairo","articleBody":"Trying to run tight_layout with mplcairo broke since https://github.com/matplotlib/matplotlib/pull/17620 with\r\n```\r\nValueError: trying to set draw_gouraud_triangles which is not a method, property, or instance level attribute\r\n```\r\nbecause the check `isinstance(cls_orig, types.FunctionType)` fails for extension methods (such as `GraphicsContextRendererCairo.\u003cany method\u003e`). Looks like a better check is actually something like `isinstance(orig, types.MethodType) and hasattr(type(obj), attr)` (the first isinstance check verifies that `orig` is 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...","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2020-06-16T13:58:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/17646/matplotlib/issues/17646"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:678772a6-076f-d5c9-6937-92b391bc1baa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B4A0:37A81A:2C4806:3B21EE:6A52EB2A |
| html-safe-nonce | 0d06e54632fde2631e182539d5dc9f994120f87bc484081b97a764c13d5d67b4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNEEwOjM3QTgxQToyQzQ4MDY6M0IyMUVFOjZBNTJFQjJBIiwidmlzaXRvcl9pZCI6Ijg5NzU2NzU4MDI4ODk5Mzk3NTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 93a01eb2d49b0c9a5143bf72d6c8feed945138bb5b4d455891f5277eca1207b3 |
| hovercard-subject-tag | issue:639691393 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/17646/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0bd83c76680c1c7aba7f3a5449ea3c21c8e58f21848d9575611bf9f053b0c046/matplotlib/matplotlib/issues/17646 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0bd83c76680c1c7aba7f3a5449ea3c21c8e58f21848d9575611bf9f053b0c046/matplotlib/matplotlib/issues/17646 |
| og:image:alt | Trying to run tight_layout with mplcairo broke since #17620 with ValueError: trying to set draw_gouraud_triangles which is not a method, property, or instance level attribute because the check isin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width