Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0632fbd

Browse filesBrowse 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
Copy full SHA for 0632fbd

File tree

2 files changed

+6
-1
lines changed
Filter options

2 files changed

+6
-1
lines changed
+3Lines 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

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_webagg.py
+3-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.