Title: [Bug]: resize_event deprecation warnings when creating figure on macOS with version 3.6.0 · Issue #23921 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: resize_event deprecation warnings when creating figure on macOS with version 3.6.0 · Issue #23921 · matplotlib/matplotlib
X Title: [Bug]: resize_event deprecation warnings when creating figure on macOS with version 3.6.0 · Issue #23921 · matplotlib/matplotlib
Description: Bug summary Creating a figure via plt.figure() with matplotlib version 3.6.0 results in a MatplotlibDeprecationWarning. I see this on macOS (both M1 and Intel) and have not managed to reproduce this in a few other container environments ...
Open Graph Description: Bug summary Creating a figure via plt.figure() with matplotlib version 3.6.0 results in a MatplotlibDeprecationWarning. I see this on macOS (both M1 and Intel) and have not managed to reproduce thi...
X Description: Bug summary Creating a figure via plt.figure() with matplotlib version 3.6.0 results in a MatplotlibDeprecationWarning. I see this on macOS (both M1 and Intel) and have not managed to reproduce thi...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23921
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: resize_event deprecation warnings when creating figure on macOS with version 3.6.0","articleBody":"### Bug summary\r\n\r\nCreating a figure via `plt.figure()` with `matplotlib` version 3.6.0 results in a `MatplotlibDeprecationWarning`. I see this on macOS (both M1 and Intel) and have not managed to reproduce this in a few other container environments I tried.\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nplt.figure()\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\n```\r\n/private/tmp/mpl/test.py:3: MatplotlibDeprecationWarning: The resize_event function was deprecated in Matplotlib 3.6 and will be removed two minor releases later. Use callbacks.process('resize_event', ResizeEvent(...)) instead.\r\n plt.figure()\r\n```\r\n\r\n### Expected outcome\r\n\r\nno warning raised\r\n\r\n### Additional information\r\n\r\nI have not managed to reproduce this in any containers, so perhaps this is specific to the macosx backend. No warnings appear in earlier versions. I can reproduce the behavior also in new conda environments and virtual environments, here is a full example:\r\n```bash\r\n/tmp/mpl ❯ ls\r\n/tmp/mpl ❯ pipx run virtualenv venv\r\ncreated virtual environment CPython3.10.4.final.0-64 in 159ms\r\n creator CPython3Posix(dest=/private/tmp/mpl/venv, clear=False, no_vcs_ignore=False, global=False)\r\n seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/alheld/Library/Application Support/virtualenv)\r\n added seed packages: pip==22.2.2, setuptools==65.3.0, wheel==0.37.1\r\n activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator\r\n/tmp/mpl ❯ source venv/bin/activate\r\n/tmp/mpl ❯ python --version\r\nPython 3.10.4\r\n/tmp/mpl ❯ which python\r\n/private/tmp/mpl/venv/bin/python\r\n/tmp/mpl ❯ pip install matplotlib\r\nCollecting matplotlib\r\n Using cached matplotlib-3.6.0-cp310-cp310-macosx_11_0_arm64.whl (7.2 MB)\r\nCollecting pillow\u003e=6.2.0\r\n Using cached Pillow-9.2.0-cp310-cp310-macosx_11_0_arm64.whl (2.8 MB)\r\nCollecting numpy\u003e=1.19\r\n Using cached numpy-1.23.3-cp310-cp310-macosx_11_0_arm64.whl (13.3 MB)\r\nCollecting packaging\u003e=20.0\r\n Using cached packaging-21.3-py3-none-any.whl (40 kB)\r\nCollecting python-dateutil\u003e=2.7\r\n Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)\r\nCollecting cycler\u003e=0.10\r\n Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)\r\nCollecting fonttools\u003e=4.22.0\r\n Using cached fonttools-4.37.2-py3-none-any.whl (959 kB)\r\nCollecting contourpy\u003e=1.0.1\r\n Using cached contourpy-1.0.5-cp310-cp310-macosx_11_0_arm64.whl (226 kB)\r\nCollecting pyparsing\u003e=2.2.1\r\n Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)\r\nCollecting kiwisolver\u003e=1.0.1\r\n Using cached kiwisolver-1.4.4-cp310-cp310-macosx_11_0_arm64.whl (63 kB)\r\nCollecting six\u003e=1.5\r\n Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)\r\nInstalling collected packages: six, pyparsing, pillow, numpy, kiwisolver, fonttools, cycler, python-dateutil, packaging, contourpy, matplotlib\r\nSuccessfully installed contourpy-1.0.5 cycler-0.11.0 fonttools-4.37.2 kiwisolver-1.4.4 matplotlib-3.6.0 numpy-1.23.3 packaging-21.3 pillow-9.2.0 pyparsing-3.0.9 python-dateutil-2.8.2 six-1.16.0\r\n/tmp/mpl ❯ python -c \"import matplotlib.pyplot as plt; import matplotlib as mpl; print(mpl.__version__); plt.figure()\"\r\n3.6.0\r\n\u003cstring\u003e:1: MatplotlibDeprecationWarning: The resize_event function was deprecated in Matplotlib 3.6 and will be removed two minor releases later. Use callbacks.process('resize_event', ResizeEvent(...)) instead.\r\n```\r\n\r\n### Operating system\r\n\r\nmacOS 12.5.1\r\n\r\n### Matplotlib Version\r\n\r\n3.6.0\r\n\r\n### Matplotlib Backend\r\n\r\nMacOSX\r\n\r\n### Python version\r\n\r\nPython 3.10.4\r\n\r\n### Jupyter version\r\n\r\nn/a\r\n\r\n### Installation\r\n\r\npip","author":{"url":"https://github.com/alexander-held","@type":"Person","name":"alexander-held"},"datePublished":"2022-09-17T16:33:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/23921/matplotlib/issues/23921"}
| 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:666990ef-4268-8bed-f6ff-d4296d2d84f5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 91B6:17A33D:AFE990:B34999:6A51264F |
| html-safe-nonce | 8115fecff87dc8a893027799cbfbf766421f9fec04b09f2ed6ca3df4b9f9aae2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUI2OjE3QTMzRDpBRkU5OTA6QjM0OTk5OjZBNTEyNjRGIiwidmlzaXRvcl9pZCI6IjQ4MDkxOTI4MTg2MjE4ODM5ODMiLCJyZWdpb25fZWRnZSI6InNlYSIsInJlZ2lvbl9yZW5kZXIiOiJzZWEifQ== |
| visitor-hmac | c9a7066aecb17955ecd28f5fe7fa708810c3403bcb13b7cb260175f77e6951bd |
| hovercard-subject-tag | issue:1376816517 |
| 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/23921/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d3d5529984681e60013ca858a2995a84b49093d860ca6bf42c62402cd4bff190/matplotlib/matplotlib/issues/23921 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d3d5529984681e60013ca858a2995a84b49093d860ca6bf42c62402cd4bff190/matplotlib/matplotlib/issues/23921 |
| og:image:alt | Bug summary Creating a figure via plt.figure() with matplotlib version 3.6.0 results in a MatplotlibDeprecationWarning. I see this on macOS (both M1 and Intel) and have not managed to reproduce thi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alexander-held |
| hostname | github.com |
| expected-hostname | github.com |
| None | 689b683944b0d7f015d0e776452c970832fa81b82dc15284469b556ecced715b |
| 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 | 942b51ed3bd5feee3d5e2719f890a5fe286edbbb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width