Drop python 3.2 support and move to python 3.3.

Jinja 2.7 (released 2013-05-20) supports only Python3 >=3.3 so it is time to
drop Python 3.2 and move to 3.3
This commit is contained in:
Simon Conseil 2013-05-26 12:44:32 +02:00
commit 7057d3742b
6 changed files with 22 additions and 61 deletions

View file

@ -43,6 +43,10 @@ To install Pelican and its dependencies::
$ python setup.py develop
Or using ``pip``::
$ pip install -e .
Coding standards
================
@ -88,28 +92,22 @@ functional tests. To do so, you can use the following two commands::
samples/content/
$ pelican -o pelican/tests/output/basic/ samples/content/
Testing on Python 3.x
---------------------
Testing on Python 2 and 3
-------------------------
Testing on Python 3.x currently requires some extra steps: installing
Python 3.x-compatible versions of dependent packages and plugins.
Testing on Python 3 currently requires some extra steps: installing
Python 3-compatible versions of dependent packages and plugins.
However, you must tell ``tox`` to use those Python 3.x-compatible libraries.
If you forget this, ``tox`` will pull the regular packages from PyPI, and the
tests will fail.
Tox_ is a useful tool to run tests on both versions. It will install the
Python 3-compatible version of dependent packages.
Tell ``tox`` about the local packages thusly: enter the source directory of
smartypants and run ``tox`` there. Do this again for the ``typogrify`` and
``webassets`` packages. SmartyPants and Typogrify do not have real tests, and
``webassets`` will fail noisily, but as a result we get these libraries neatly
packaged in tox's ``distshare`` directory, which we need in order to run
``tox`` for Pelican.
.. _Tox: http://testrun.org/tox/latest/
Python 3.x development tips
===========================
Python 3 development tips
=========================
Here are some tips that may be useful when doing some code for both Python 2.7
and Python 3.x at the same time:
and Python 3 at the same time:
- Assume every string and literal is unicode (import unicode_literals):
@ -144,4 +142,3 @@ and Python 3.x at the same time:
changed it where I felt necessary.
- Changed xrange() back to range(), so it is valid in both Python versions.

View file

@ -4,10 +4,9 @@ Getting started
Installing Pelican
==================
Pelican currently runs best on Python 2.7.x; earlier versions of Python are not
supported. There is provisional support for Python 3.2 and higher, although
there may be rough edges, particularly with regards to optional 3rd-party
components.
Pelican currently runs best on Python 2.7.x; earlier versions of Python are
not supported. There is provisional support for Python 3.3, although there may
be rough edges, particularly with regards to optional 3rd-party components.
You can install Pelican via several different methods. The simplest is via
`pip <http://www.pip-installer.org/>`_::