Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pystache_custom
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pystache_custom
Commits
96f039d5
Commit
96f039d5
authored
Apr 08, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added notes to the README regarding Python 3.
parent
3f3f2a96
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
8 deletions
+38
-8
HISTORY.rst
+2
-2
README.rst
+36
-6
No files found.
HISTORY.rst
View file @
96f039d5
History
=======
TBD
---
0.5.1 (TBD)
---
--------
* Test runner now supports both yaml and json forms of Mustache spec.
...
...
README.rst
View file @
96f039d5
...
...
@@ -79,6 +79,22 @@ Pull it together::
Hello, Pizza!
Python 3
========
As of v0.5.1, Pystache fully supports Python 3. There are slight differences
in behavior between Pystache running under Python 2 and 3, as follows:
* In Python 2, the default html-escape function ``cgi.escape()`` does not
escape single quotes; whereas in Python 3, the default escape function
``html.escape()`` does escape single quotes.
* In both Python 2 and 3, the string and file encodings default to
``sys.getdefaultencoding()``. However, this function can return different
values under Python 2 and 3, even when run from the same system. Check
your own system for the behavior on your system, or do not rely on the
defaults by passing the encodings in explicitly (e.g. to the ``Renderer`` class).
Unicode Handling
================
...
...
@@ -115,7 +131,26 @@ default to values set in Pystache's ``defaults`` module.
Test It
=======
nose_ works great! ::
Pystache can be tested using both Python 2 and 3 -- even from a single
Python 2 install if using Distribute's ``test`` (see below).
To include tests from the Mustache spec in your test runs: ::
git submodule init
git submodule update
### Python 3
For Python 3, we recommend installing and using [Distribute](http://pypi.python.org/pypi/distribute).
Then one can invoke Distribute's [``test``](http://packages.python.org/distribute/setuptools.html#test) command:
python setup.py test
### Python 2
For Python 2, we recommend nose_ ::
pip install nose
cd pystache
...
...
@@ -126,11 +161,6 @@ to type, for example ::
nosetests-2.4
To include tests from the Mustache spec in your test runs: ::
git submodule init
git submodule update
To run all available tests (including doctests)::
nosetests --with-doctest --doctest-extension=rst
...
...
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