Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 758bfca

Browse files
anntzertacaswell
authored andcommitted
Merge pull request #11262 from mdboom/optional-threading
Use dummy_threading if threading not available Conflicts: lib/matplotlib/backends/backend_agg.py - conflicts due to removing __future__ / six on master
1 parent 393c862 commit 758bfca

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lib/matplotlib/backends/backend_agg.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424

2525
import six
2626

27-
import threading
27+
try:
28+
import threading
29+
except ImportError:
30+
import dummy_threading as threading
31+
2832
import numpy as np
2933
from collections import OrderedDict
3034
from math import radians, cos, sin

lib/matplotlib/font_manager.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@
4848
import json
4949
import os
5050
import sys
51-
from threading import Timer
51+
try:
52+
from threading import Timer
53+
except ImportError:
54+
from dummy_threading import Timer
5255
import warnings
5356
import logging
5457

0 commit comments

Comments
 (0)