8000 MNT: Remove dummy_threading because threading is always available by greglucas · Pull Request #23073 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

MNT: Remove dummy_threading because threading is always available #23073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@
.. _Anti-Grain Geometry: http://agg.sourceforge.net/antigrain.com
"""

try:
import threading
except ImportError:
import dummy_threading as threading
from contextlib import nullcontext
from math import radians, cos, sin
import threading

import numpy as np

Expand Down
9 changes: 2 additions & 7 deletions lib/matplotlib/font_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,7 @@
import re
import subprocess
import sys
try:
import threading
from threading import Timer
except ImportError:
import dummy_threading as threading
from dummy_threading import Timer
import threading

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

# Delay the warning by 5s.
timer = Timer(5, lambda: _log.warning(
timer = threading.Timer(5, lambda: _log.warning(
'Matplotlib is building the font cache; this may take a moment.'))
timer.start()
try:
Expand Down
5 changes: 1 addition & 4 deletions lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@
from numbers import Number
import re
import sys
import threading
import time
try:
import threading
except ImportError:
import dummy_threading as threading

from cycler import cycler
import matplotlib
Expand Down
0