Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
ed2b58f7
Commit
ed2b58f7
authored
Feb 07, 2014
by
Arfrever Frehtes Taifersar Arahesis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use io.open() instead of codecs.open().
(builtins.open() is io.open() in Python 3.)
parent
dc18e9ba
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
setup.py
setup.py
+3
-3
setuptools/tests/test_svn.py
setuptools/tests/test_svn.py
+3
-4
No files found.
setup.py
View file @
ed2b58f7
#!/usr/bin/env python
#!/usr/bin/env python
"""Distutils setup file, used to install or test 'setuptools'"""
"""Distutils setup file, used to install or test 'setuptools'"""
import
sys
import
io
import
os
import
os
import
sys
import
textwrap
import
textwrap
import
codecs
# Allow to run setup.py from another directory.
# Allow to run setup.py from another directory.
os
.
chdir
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
os
.
chdir
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
...
@@ -82,7 +82,7 @@ class test(_test):
...
@@ -82,7 +82,7 @@ class test(_test):
f
.
write
(
ep_content
)
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
# the release script adds hyperlinks to issues
if
os
.
path
.
exists
(
'CHANGES (links).txt'
):
if
os
.
path
.
exists
(
'CHANGES (links).txt'
):
...
...
setuptools/tests/test_svn.py
View file @
ed2b58f7
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
"""svn tests"""
"""svn tests"""
import
io
import
os
import
os
import
subprocess
import
sys
import
sys
import
unittest
import
unittest
import
codecs
import
subprocess
from
setuptools.tests
import
environment
from
setuptools.tests
import
environment
from
setuptools.compat
import
unicode
,
unichr
from
setuptools.compat
import
unicode
,
unichr
...
@@ -54,7 +53,7 @@ class TestSvnVersion(unittest.TestCase):
...
@@ -54,7 +53,7 @@ class TestSvnVersion(unittest.TestCase):
def
_read_utf8_file
(
path
):
def
_read_utf8_file
(
path
):
fileobj
=
None
fileobj
=
None
try
:
try
:
fileobj
=
codecs
.
open
(
path
,
'r'
,
'utf-8'
)
fileobj
=
io
.
open
(
path
,
'r'
,
encoding
=
'utf-8'
)
data
=
fileobj
.
read
()
data
=
fileobj
.
read
()
return
data
return
data
finally
:
finally
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment