10000 Deprecate backend_webagg.ServerThread. · matplotlib/matplotlib@0632fbd · GitHub
[go: up one dir, main page]

Skip to content

Commit 0632fbd

Browse files
anntzerchahak13
authored andcommitted
Deprecate backend_webagg.ServerThread.
It is clearly just for internal use, can be replaced by a plain Thread(target=...), and removing it gets rid of a large block in the webagg api docs that just restates the standard Thread docstring.
1 parent 7d4931b commit 0632fbd

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
``backend_webagg.ServerThread`` is deprecated
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
... with no replacement.

lib/matplotlib/backends/backend_webagg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@
4040
TimerAsyncio, TimerTornado)
4141

4242

43+
@mpl._api.deprecated("3.7")
4344
class ServerThread(threading.Thread):
4445
def run(self):
4546
tornado.ioloop.IOLoop.instance().start()
4647

4748

48-
webagg_server_thread = ServerThread()
49+
webagg_server_thread = threading.Thread(
50+
target=lambda: tornado.ioloop.IOLoop.instance().start())
4951

5052

5153
class FigureManagerWebAgg(core.FigureManagerWebAgg):

0 commit comments

Comments
 (0)
0