macOS Sonoma (14.0) - matplotlib - "Secure coding is not enabled" warning

With the release of macOS Sonoma (14.0), any use of matplotlib in Python code creates a warning similar to the following:

2023-11-07 07:01:09.093 Python[85638:66129140] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.

I was not able to find an existing matplotlib issue related to this warning, but it relates to a known serious potential vulnerability; apparently Apple made this a warning and not an error to avoid breaking existing apps until they could be individually fixed:

Could this be fixed as part of the upcoming matplotlib release?

This is probably doable, but it would be best if you open an issue so that developers with macOS expertise could look at it.

@setaylorcityu I filed an issue at Matplotlib Github to track this since I also experienced it. It was repeatable for me until I closed and restarted my venv. Do you still get the warning? Is there anything you can contribute to the discussion to help the devs reproduce the warning?