Merge lp:~keegan-csmith/ibid/jinja2-517784 into lp:ibid

Proposed by Keegan Carruthers-Smith on 2011-08-12
Status: Merged
Approved by: Stefano Rivera on 2011-10-25
Approved revision: 1033
Merged at revision: 1037
Proposed branch: lp:~keegan-csmith/ibid/jinja2-517784
Merge into: lp:ibid
Diff against target: 74 lines (+7/-6)
4 files modified
INSTALL (+1/-1)
docs/install.rst (+2/-2)
ibid/source/http.py (+3/-2)
setup.py (+1/-1)
To merge this branch: bzr merge lp:~keegan-csmith/ibid/jinja2-517784
Reviewer Review Type Date Requested Status
Stefano Rivera 2011-08-12 Approve on 2011-10-25
Jonathan Hitchcock Approve on 2011-10-23
Max Rabkin Approve on 2011-08-20
Review via email: mp+71326@code.launchpad.net

Commit message

Switched from Jinja to Jinja2

To post a comment you must log in.
Stefano Rivera (stefanor) wrote :

Yay, about time

review: Approve
Max Rabkin (max-rabkin) wrote :

This approval is based on Stefano telling me it's trivial :)

review: Approve
Download full text (23.5 KiB)

The attempt to merge lp:~keegan-csmith/ibid/jinja2-517784 into lp:ibid failed. Below is the output from the failed tests.

ibid.test.plugins.test_calc
  CalcTest
    test_basic ... [OK]
    test_too_big ... [OK]
ibid.test.plugins.test_conversions
  UnihanTest
    test_simp_trad ... [OK]
/usr/lib/pymodules/python2.6/html5lib/treebuilders/soup.py:3: DeprecationWarning: BeautifulSoup 3.x (as of 3.1) is not fully compatible with html5lib and support will be removed in the future
/usr/lib/pymodules/python2.6/html5lib/treebuilders/soup.py:141: DataLossWarning: BeautifulSoup cannot represent elements in any namespace
/usr/lib/pymodules/python2.6/html5lib/treebuilders/soup.py:163: DataLossWarning: BeautifulSoup cannot represent elements in any namespace
ibid.test.plugins.test_core
  TestAddressed
    test_happy_prefix_names ... [OK]
    test_happy_suffix_names ... [OK]
    test_non_messages ... [OK]
    test_sad_prefix_names ... [OK]
    test_sad_suffix_names ... [OK]
    test_strip_punct ... [OK]
ibid.test.plugins.test_factoid
  FactoidTest
    test_also ... [FAIL]
    test_append ... [FAIL]
    test_duplicate_names ... [FAIL]
    test_empty ... [FAIL]
    test_forget_multiple ... [FAIL]
    test_forget_wildcard ... [OK]
    test_get_case ... [FAIL]
    test_modify_nothing ... [OK]
    test_multiple_copula ... [FAIL]
    test_name_punctuation ... [FAIL]
    test_same_as_nothing ... [OK]
    test_search_case ... [FAIL]
    test_search_unescape ... [FAIL]
    test_string_replace ... [FAIL]
    test_string_transliterate ... [FAIL]
    test_unicode_name ... [FAIL]
    test_wildcard_tamecard ... [FAIL]
ibid.test.plugins.test_google
  GDefineTest
    test_basic ... [OK]
    test_unicode_latin ... [OK]
ibid.test.plugins.test_url
  TestURLGrabber
    test_bad_grabs ... [OK]
    test_good_grabs ... ...

Download full text (23.5 KiB)

The attempt to merge lp:~keegan-csmith/ibid/jinja2-517784 into lp:ibid failed. Below is the output from the failed tests.

ibid.test.plugins.test_calc
  CalcTest
    test_basic ... [OK]
    test_too_big ... [OK]
ibid.test.plugins.test_conversions
  UnihanTest
    test_simp_trad ... [OK]
/usr/lib/pymodules/python2.6/html5lib/treebuilders/soup.py:3: DeprecationWarning: BeautifulSoup 3.x (as of 3.1) is not fully compatible with html5lib and support will be removed in the future
/usr/lib/pymodules/python2.6/html5lib/treebuilders/soup.py:141: DataLossWarning: BeautifulSoup cannot represent elements in any namespace
/usr/lib/pymodules/python2.6/html5lib/treebuilders/soup.py:163: DataLossWarning: BeautifulSoup cannot represent elements in any namespace
ibid.test.plugins.test_core
  TestAddressed
    test_happy_prefix_names ... [OK]
    test_happy_suffix_names ... [OK]
    test_non_messages ... [OK]
    test_sad_prefix_names ... [OK]
    test_sad_suffix_names ... [OK]
    test_strip_punct ... [OK]
ibid.test.plugins.test_factoid
  FactoidTest
    test_also ... [FAIL]
    test_append ... [FAIL]
    test_duplicate_names ... [FAIL]
    test_empty ... [FAIL]
    test_forget_multiple ... [FAIL]
    test_forget_wildcard ... [OK]
    test_get_case ... [FAIL]
    test_modify_nothing ... [OK]
    test_multiple_copula ... [FAIL]
    test_name_punctuation ... [FAIL]
    test_same_as_nothing ... [OK]
    test_search_case ... [FAIL]
    test_search_unescape ... [FAIL]
    test_string_replace ... [FAIL]
    test_string_transliterate ... [FAIL]
    test_unicode_name ... [FAIL]
    test_wildcard_tamecard ... [FAIL]
ibid.test.plugins.test_google
  GDefineTest
    test_basic ... [OK]
    test_unicode_latin ... [OK]
ibid.test.plugins.test_url
  TestURLGrabber
    test_bad_grabs ... [OK]
    test_good_grabs ... ...

Download full text (23.5 KiB)

The attempt to merge lp:~keegan-csmith/ibid/jinja2-517784 into lp:ibid failed. Below is the output from the failed tests.

ibid.test.plugins.test_calc
  CalcTest
    test_basic ... [OK]
    test_too_big ... [OK]
ibid.test.plugins.test_conversions
  UnihanTest
    test_simp_trad ... [OK]
/usr/lib/pymodules/python2.6/html5lib/treebuilders/soup.py:3: DeprecationWarning: BeautifulSoup 3.x (as of 3.1) is not fully compatible with html5lib and support will be removed in the future
/usr/lib/pymodules/python2.6/html5lib/treebuilders/soup.py:141: DataLossWarning: BeautifulSoup cannot represent elements in any namespace
/usr/lib/pymodules/python2.6/html5lib/treebuilders/soup.py:163: DataLossWarning: BeautifulSoup cannot represent elements in any namespace
ibid.test.plugins.test_core
  TestAddressed
    test_happy_prefix_names ... [OK]
    test_happy_suffix_names ... [OK]
    test_non_messages ... [OK]
    test_sad_prefix_names ... [OK]
    test_sad_suffix_names ... [OK]
    test_strip_punct ... [OK]
ibid.test.plugins.test_factoid
  FactoidTest
    test_also ... [FAIL]
    test_append ... [FAIL]
    test_duplicate_names ... [FAIL]
    test_empty ... [FAIL]
    test_forget_multiple ... [FAIL]
    test_forget_wildcard ... [OK]
    test_get_case ... [FAIL]
    test_modify_nothing ... [OK]
    test_multiple_copula ... [FAIL]
    test_name_punctuation ... [FAIL]
    test_same_as_nothing ... [OK]
    test_search_case ... [FAIL]
    test_search_unescape ... [FAIL]
    test_string_replace ... [FAIL]
    test_string_transliterate ... [FAIL]
    test_unicode_name ... [FAIL]
    test_wildcard_tamecard ... [FAIL]
ibid.test.plugins.test_google
  GDefineTest
    test_basic ... [OK]
    test_unicode_latin ... [OK]
ibid.test.plugins.test_url
  TestURLGrabber
    test_bad_grabs ... [OK]
    test_good_grabs ... ...

Jonathan Hitchcock (vhata) :
review: Approve
Stefano Rivera (stefanor) wrote :

This breaks because trial chdirs

apparently I thought the following would work:

templates = Environment(loader=FileSystemLoader(os.path.abspath(locate_resource('ibid', 'templates'))))

and said so on IRC

review: Needs Fixing

Unit tests now pass \o/

lp:~keegan-csmith/ibid/jinja2-517784 updated on 2011-10-25
1033. By Keegan Carruthers-Smith on 2011-10-25

It's never too late to fix a bug.

Stefano Rivera (stefanor) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'INSTALL'
2--- INSTALL 2011-01-24 21:31:11 +0000
3+++ INSTALL 2011-10-25 12:01:24 +0000
4@@ -25,7 +25,7 @@
5 # aptitude install python-beautifulsoup \
6 python-dateutil python-dnspython python-feedparser \
7 python-html2text python-html5lib python-imdbpy \
8- python-jinja python-silc python-setuptools \
9+ python-jinja2 python-silc python-setuptools \
10 python-simplejson python-soappy python-sqlalchemy \
11 python-twisted python-wokkel
12
13
14=== modified file 'docs/install.rst'
15--- docs/install.rst 2011-01-24 21:31:11 +0000
16+++ docs/install.rst 2011-10-25 12:01:24 +0000
17@@ -65,7 +65,7 @@
18
19 Web source and web services:
20
21-* `Jinja <http://jinja.pocoo.org/>`_
22+* `Jinja2 <http://jinja.pocoo.org/2/>`_
23
24 Other sources:
25
26@@ -264,7 +264,7 @@
27 user@box $ sudo aptitude install bzr python-configobj python-sqlalchemy \
28 python-twisted python-beautifulsoup python-celementtree \
29 python-html5lib python-setuptools python-simplejson \
30- python-soappy python-jinja python-dateutil python-virtualenv
31+ python-soappy python-jinja2 python-dateutil python-virtualenv
32
33 Create a user to run your bot as::
34
35
36=== modified file 'ibid/source/http.py'
37--- ibid/source/http.py 2010-02-06 09:56:27 +0000
38+++ ibid/source/http.py 2011-10-25 12:01:24 +0000
39@@ -2,11 +2,12 @@
40 # Released under terms of the MIT/X/Expat Licence. See COPYING for details.
41
42 import logging
43+import os
44
45 from twisted.web import server, resource, static, xmlrpc, soap
46 from twisted.application import internet
47 from twisted.internet import reactor
48-from jinja import Environment, FileSystemLoader
49+from jinja2 import Environment, FileSystemLoader
50
51 import ibid
52 from ibid.source import IbidSourceFactory
53@@ -15,7 +16,7 @@
54 from ibid.utils import locate_resource
55
56 templates = Environment(loader=FileSystemLoader(
57- locate_resource('ibid', 'templates')))
58+ os.path.abspath(locate_resource('ibid', 'templates'))))
59
60 class Index(resource.Resource):
61
62
63=== modified file 'setup.py'
64--- setup.py 2011-03-15 10:00:04 +0000
65+++ setup.py 2011-10-25 12:01:24 +0000
66@@ -13,7 +13,7 @@
67 'feedparser',
68 'html2text',
69 'html5lib',
70- 'jinja',
71+ 'jinja2',
72 'pyopenssl',
73 'PyStemmer',
74 'python-dateutil',

Subscribers

People subscribed via source and target branches