summaryrefslogtreecommitdiff
path: root/coverage/phystokens.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/phystokens.py')
-rw-r--r--coverage/phystokens.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/coverage/phystokens.py b/coverage/phystokens.py
index f3f633dd..c52e28ae 100644
--- a/coverage/phystokens.py
+++ b/coverage/phystokens.py
@@ -262,19 +262,3 @@ if sys.version_info >= (3, 0):
source_encoding = _source_encoding_py3
else:
source_encoding = _source_encoding_py2
-
-
-def read_python_source(filename):
- """Read the Python source text from `filename`.
-
- Returns unicode on Python 3, bytes on Python 2.
-
- """
- # Python 3.2 provides `tokenize.open`, the best way to open source files.
- if sys.version_info >= (3, 2):
- f = tokenize.open(filename)
- else:
- f = open(filename, "rU")
-
- with f:
- return f.read()