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 11b1260

Browse filesBrowse files
committed
MNT: Remove dummy_threading because threading is always available
With Python 3.7 and above, the threading module is always available.
1 parent 9cf4611 commit 11b1260
Copy full SHA for 11b1260

File tree

Expand file treeCollapse file tree

3 files changed

+4
-15
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+4
-15
lines changed

‎lib/matplotlib/backends/backend_agg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_agg.py
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@
2121
.. _Anti-Grain Geometry: http://agg.sourceforge.net/antigrain.com
2222
"""
2323

24-
try:
25-
import threading
26-
except ImportError:
27-
import dummy_threading as threading
2824
from contextlib import nullcontext
2925
from math import radians, cos, sin
26+
import threading
3027

3128
import numpy as np
3229

‎lib/matplotlib/font_manager.py

Copy file name to clipboardExpand all lines: lib/matplotlib/font_manager.py
+2-7Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,7 @@
3636
import re
3737
import subprocess
3838
import sys
39-
try:
40-
import threading
41-
from threading import Timer
42-
except ImportError:
43-
import dummy_threading as threading
44-
from dummy_threading import Timer
39+
import threading
4540

4641
import matplotlib as mpl
4742
from matplotlib import _api, _afm, cbook, ft2font, rcParams
@@ -1100,7 +1095,7 @@ def __init__(self, size=None, weight='normal'):
11001095
self.ttflist = []
11011096

11021097
# Delay the warning by 5s.
1103-
timer = Timer(5, lambda: _log.warning(
1098+
timer = threading.Timer(5, lambda: _log.warning(
11041099
'Matplotlib is building the font cache; this may take a moment.'))
11051100
timer.start()
11061101
try:

‎lib/matplotlib/pyplot.py

Copy file name to clipboardExpand all lines: lib/matplotlib/pyplot.py
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,8 @@
4343
from numbers import Number
4444
import re
4545
import sys
46+
import threading
4647
import time
47-
try:
48-
import threading
49-
except ImportError:
50-
import dummy_threading as threading
5148

5249
from cycler import cycler
5350
import matplotlib

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.