Title: Deprecate public access to XMLWriter; simplify some attribute settings by anntzer · Pull Request #31143 · matplotlib/matplotlib · GitHub
Open Graph Title: Deprecate public access to XMLWriter; simplify some attribute settings by anntzer · Pull Request #31143 · matplotlib/matplotlib
X Title: Deprecate public access to XMLWriter; simplify some attribute settings by anntzer · Pull Request #31143 · matplotlib/matplotlib
Description: It is not necessary to put the attributes into a dict just to pass the dict to start() later; rather the attributes can be passed directly as kwargs to element(). Even in the case where the attributes are not valid identifiers one can use dict-unpacking to pass them. This also allows removing the awkward attrib={} mutable default on XMLWriter (#31141), and the (theoretical) impossibility of passing an attribute named "attrib" to start(). As this changes the API of XMLWriter, take that opportunity to make that helper class private (with deprecation). PR summary PR checklist "closes #0000" is in the body of the PR description to link the related issue new and changed code is tested Plotting related features are demonstrated in an example New Features and API Changes are noted with a directive and release note Documentation complies with general and docstring guidelines
Open Graph Description: It is not necessary to put the attributes into a dict just to pass the dict to start() later; rather the attributes can be passed directly as kwargs to element(). Even in the case where the attrib...
X Description: It is not necessary to put the attributes into a dict just to pass the dict to start() later; rather the attributes can be passed directly as kwargs to element(). Even in the case where the attrib...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/31143
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:59fc9f00-29ce-57b4-8e09-1aab3a93ca40 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D08C:FDB96:CBE9FB:11158FC:6A51B840 |
| html-safe-nonce | 9926d6435f066520a91ea2faf511115d9725a09b36ab3ba6fc61753e64563785 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDhDOkZEQjk2OkNCRTlGQjoxMTE1OEZDOjZBNTFCODQwIiwidmlzaXRvcl9pZCI6Ijg4MjMyMjQzOTI1MzAxMTQ2MjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d0ffa822ad520e63930c9f439404cb7b54b17f247669d5cbd172d5b5f19cc707 |
| hovercard-subject-tag | pull_request:3278265182 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/matplotlib/matplotlib/pull/31143/files |
| twitter:image | https://avatars.githubusercontent.com/u/1322974?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1322974?s=400&v=4 |
| og:image:alt | It is not necessary to put the attributes into a dict just to pass the dict to start() later; rather the attributes can be passed directly as kwargs to element(). Even in the case where the attrib... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width