|
| 1 | +Preliminary support for free-threaded CPython 3.13 |
| 2 | +-------------------------------------------------- |
| 3 | + |
| 4 | +Matplotlib 3.10 has preliminary support for the free-threaded build of CPython 3.13. See |
| 5 | +https://py-free-threading.github.io, `PEP 703 <https://peps.python.org/pep-0703/>`_ and |
| 6 | +the `CPython 3.13 release notes |
| 7 | +<https://docs.python.org/3.13/whatsnew/3.13.html#free-threaded-cpython>`_ for more detail |
| 8 | +about free-threaded Python. |
| 9 | + |
| 10 | +Support for free-threaded Python does not mean that Matplotlib is wholly thread safe. We |
| 11 | +expect that use of a Figure within a single thread will work, and though input data is |
| 12 | +usually copied, modification of data objects used for a plot from another thread may |
| 13 | +cause inconsistencies in cases where it is not. Use of any global state (such as the |
| 14 | +``pyplot`` module) is highly discouraged and unlikely to work consistently. Also note |
| 15 | +that most GUI toolkits expect to run on the main thread, so interactive usage may be |
| 16 | +limited or unsupported from other threads. |
| 17 | + |
| 18 | +If you are interested in free-threaded Python, for example because you have a |
| 19 | +multiprocessing-based workflow that you are interested in running with Python threads, we |
| 20 | +encourage testing and experimentation. If you run into problems that you suspect are |
| 21 | +because of Matplotlib, please open an issue, checking first if the bug also occurs in the |
| 22 | +"regular" non-free-threaded CPython 3.13 build. |
0 commit comments