Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix setup.py - reading non-ascii file on python3 #69

Closed
wants to merge 2 commits into from
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
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Use `pip <http://pip-installer.org>`_ or easy_install::

pip install schema==0.3.1

Alternatively, you can just drop ``schema.py`` file into your projectit is
Alternatively, you can just drop ``schema.py`` file into your project--it is
self-contained.

- **schema** is tested with Python 2.6, 2.7, 3.2, 3.3 and PyPy.
Expand Down Expand Up @@ -95,7 +95,7 @@ Callables

If ``Schema(...)`` encounters a callable (function, class, or object with
``__call__`` method) it will call it, and if its return value evaluates to
``True`` it will continue validating, elseit will raise ``SchemaError``.
``True`` it will continue validating, else--it will raise ``SchemaError``.

.. code:: python

Expand Down Expand Up @@ -123,7 +123,7 @@ If ``Schema(...)`` encounters a callable (function, class, or object with
If ``Schema(...)`` encounters an object with method ``validate`` it will run
this method on corresponding data as ``data = obj.validate(data)``. This method
may raise ``SchemaError`` exception, which will tell ``Schema`` that that piece
of data is invalid, otherwiseit will continue validating.
of data is invalid, otherwise--it will continue validating.

As example, you can use ``Use`` for creating such objects. ``Use`` helps to use
a function or type to convert a value while validating it:
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from setuptools import setup

import codecs
import schema


Expand All @@ -13,7 +14,7 @@
keywords="schema json validation",
url="http://github.com/halst/schema",
py_modules=['schema'],
long_description=open('README.rst').read(),
long_description=codecs.open('README.rst', 'r', 'utf-8').read(),
classifiers=[
"Development Status :: 3 - Alpha",
"Topic :: Utilities",
Expand Down