diff options
| author | Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com> | 2014-02-07 17:38:25 +0100 |
|---|---|---|
| committer | Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com> | 2014-02-07 17:38:25 +0100 |
| commit | ed2b58f7db37491f8ffa83c7dafbdb4b5b2ddbb4 (patch) | |
| tree | 43f6a88d2c555f974ef6aca92db02ad451cdaf97 | |
| parent | dc18e9bab9e5bca57269775572a4e77fcef98b78 (diff) | |
| download | python-setuptools-git-ed2b58f7db37491f8ffa83c7dafbdb4b5b2ddbb4.tar.gz | |
Use io.open() instead of codecs.open().
(builtins.open() is io.open() in Python 3.)
| -rwxr-xr-x | setup.py | 6 | ||||
| -rw-r--r-- | setuptools/tests/test_svn.py | 7 |
2 files changed, 6 insertions, 7 deletions
@@ -1,9 +1,9 @@ #!/usr/bin/env python """Distutils setup file, used to install or test 'setuptools'""" -import sys +import io import os +import sys import textwrap -import codecs # Allow to run setup.py from another directory. os.chdir(os.path.dirname(os.path.abspath(__file__))) @@ -82,7 +82,7 @@ class test(_test): f.write(ep_content) -readme_file = codecs.open('README.txt', encoding='utf-8') +readme_file = io.open('README.txt', encoding='utf-8') # the release script adds hyperlinks to issues if os.path.exists('CHANGES (links).txt'): diff --git a/setuptools/tests/test_svn.py b/setuptools/tests/test_svn.py index afee32b6..33400362 100644 --- a/setuptools/tests/test_svn.py +++ b/setuptools/tests/test_svn.py @@ -1,12 +1,11 @@ # -*- coding: utf-8 -*- """svn tests""" - +import io import os +import subprocess import sys import unittest -import codecs -import subprocess from setuptools.tests import environment from setuptools.compat import unicode, unichr @@ -54,7 +53,7 @@ class TestSvnVersion(unittest.TestCase): def _read_utf8_file(path): fileobj = None try: - fileobj = codecs.open(path, 'r', 'utf-8') + fileobj = io.open(path, 'r', encoding='utf-8') data = fileobj.read() return data finally: |
