[Python-modules-commits] [python-zeroconf] 05/08: Installation on system with ASCII encoding

Ruben Undheim rubund-guest at moszumanska.debian.org
Wed Apr 13 19:10:13 UTC 2016


This is an automated email from the git hooks/post-receive script.

rubund-guest pushed a commit to branch upstream
in repository python-zeroconf.

commit 60075379d57664f94fa41a96dea7c7c64489ef3d
Author: Per Sandström <per.j.sandstrom at gmail.com>
Date:   Fri Mar 11 04:55:28 2016 +0100

    Installation on system with ASCII encoding
    
    The default open function in python2 made a best effort to open text files of any encoding.
    After 3.0 the encoding has to be set correctly and it defaults to the user preferences.
---
 setup.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 54e05e1..75fdf2d 100755
--- a/setup.py
+++ b/setup.py
@@ -1,12 +1,14 @@
 #!/usr/bin/env python
 from __future__ import absolute_import, division, print_function
 
+from io import open
+
 from os.path import abspath, dirname, join
 
 from setuptools import setup
 
 PROJECT_ROOT = abspath(dirname(__file__))
-with open(join(PROJECT_ROOT, 'README.rst')) as f:
+with open(join(PROJECT_ROOT, 'README.rst'), encoding='utf-8') as f:
     readme = f.read()
 
 version = (

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-zeroconf.git



More information about the Python-modules-commits mailing list