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

Skip to content

Commit 0f0e18e

Browse files
committed
Strip python 2 code from subprocess.py
1 parent 9b48fd8 commit 0f0e18e

1 file changed

Lines changed: 4 additions & 19 deletions

File tree

lib/matplotlib/compat/subprocess.py

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,15 @@
11
"""
2-
A replacement wrapper around the subprocess module, with a number of
3-
work-arounds:
4-
- Provides a stub implementation of subprocess members on Google App Engine
5-
(which are missing in subprocess).
6-
- Use subprocess32, backport from python 3.2 on Linux/Mac work-around for
7-
https://github.com/matplotlib/matplotlib/issues/5314
2+
A replacement wrapper around the subprocess module, which provides a stub
3+
implementation of subprocess members on Google App Engine
4+
(which are missing in subprocess).
85
96
Instead of importing subprocess, other modules should use this as follows:
107
118
from matplotlib.compat import subprocess
129
1310
This module is safe to import from anywhere within matplotlib.
1411
"""
15-
16-
from __future__ import absolute_import # Required to import subprocess
17-
from __future__ import print_function
18-
import os
19-
import sys
20-
if os.name == 'posix' and sys.version_info[0] < 3:
21-
# work around for https://github.com/matplotlib/matplotlib/issues/5314
22-
try:
23-
import subprocess32 as subprocess
24-
except ImportError:
25-
import subprocess
26-
else:
27-
import subprocess
12+
import subprocess
2813

2914
__all__ = ['Popen', 'PIPE', 'STDOUT', 'check_output', 'CalledProcessError']
3015

0 commit comments

Comments
 (0)