Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
from setuptools import setup, find_packages
import io
from os import path
import re


VERSION = re.search("VERSION = '([^']+)'", open(
path.join(path.dirname(__file__), 'webencodings', '__init__.py')
VERSION = re.search("VERSION = '([^']+)'", io.open(
path.join(path.dirname(__file__), 'webencodings', '__init__.py'),
encoding='utf-8'
).read().strip()).group(1)

LONG_DESCRIPTION = open(path.join(path.dirname(__file__), 'README.rst')).read()
LONG_DESCRIPTION = io.open(
path.join(path.dirname(__file__), 'README.rst'),
encoding='utf-8'
).read()


setup(
Expand Down
2 changes: 1 addition & 1 deletion webencodings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def encode(input, encoding=UTF8, errors='strict'):

def iter_decode(input, fallback_encoding, errors='replace'):
"""
Pull-based decoder.
"Pull"-based decoder.

:param input:
An iterable of byte strings.
Expand Down