Merge lp:~lifeless/python-oops-tools/bug-1048470 into lp:python-oops-tools

Proposed by Robert Collins
Status: Merged
Approved by: Steve Kowalik
Approved revision: no longer in the source branch.
Merged at revision: 39
Proposed branch: lp:~lifeless/python-oops-tools/bug-1048470
Merge into: lp:python-oops-tools
Diff against target: 52 lines (+8/-1)
3 files modified
src/oopstools/NEWS.txt (+3/-0)
src/oopstools/oops/dbsummaries.py (+3/-1)
src/oopstools/oops/test/test_dbsummaries.py (+2/-0)
To merge this branch: bzr merge lp:~lifeless/python-oops-tools/bug-1048470
Reviewer Review Type Date Requested Status
John A Meinel (community) Approve
Review via email: mp+123480@code.launchpad.net

Commit message

This fixes handling of non-unicode pageids, which were stored OK in the DB, but broke HTML report rendering.

Description of the change

This fixes handling of non-unicode pageids, which were stored OK in the
DB, but broke HTML report rendering.

To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

Does what it says on the tin. Looks good to me.

review: Approve
Revision history for this message
Launchpad PQM Bot (launchpad-pqm) wrote :
Download full text (5.0 KiB)

The attempt to merge lp:~lifeless/python-oops-tools/bug-1048470 into lp:python-oops-tools failed.Below is the output from the failed tests.

find . -type f -name '*.py[co]' -exec rm -f {} \;
rm -f bin/buildout
rm -f src/oopstools/settings.py
bzr clean-tree --unknown --force
bzr up download-cache
python bootstrap.py \
  --setup-source=download-cache/ez_setup.py \
  --download-base=download-cache/dist --eggs=eggs
Download error: [Errno 111] Connection refused -- Some packages may not be found!
Download error: [Errno 111] Connection refused -- Some packages may not be found!
Generated script '/home/pqm/pqm-workdir/oops-tools/bin/buildout'.
bin/buildout configuration:db-port=5433
Develop: '/home/pqm/pqm-workdir/oops-tools/.'
Uninstalling filetemplates.
Updating scripts.
Installing filetemplates.
Updating django.
Updating docs.
Updating tags.
bin/test
Creating test database for alias 'default'...

W: line 4 [buildbot-staging]: Deprecated key 'location' used
I: This option will be removed in the future; please update your configuration
W: line 2 [pqm]: Deprecated key 'location' used
I: This option will be removed in the future; please update your configuration
W: line 3 [pqm-oops-tools]: Deprecated key 'location' used
I: This option will be removed in the future; please update your configuration
W: line 1 [precise]: Deprecated key 'location' used
I: This option will be removed in the future; please update your configuration
I: [pqm-oops-tools chroot] Running command: "cd /home/pqm/pqm-workdir/oops-tools && make check"
Nothing to delete.
+N dist/auditor-0.0.3.tar.gz
+N dist/auditorfixture-0.0.4.tar.gz
+N dist/auditorfixture-0.0.5.tar.gz
+N dist/mechanize-0.2.5.zip
+N dist/oops-0.0.13.tar.gz
+N dist/oops_amqp-0.0.7.tar.gz
+N dist/oops_datedir_repo-0.0.18.tar.gz
+N dist/pgbouncer-0.0.8.tar.gz
+N dist/python-debian-0.1.21.tar.gz
+N dist/python-openid-2.2.5-fix1034376.tar.gz
+N dist/python-subunit-0.0.8.tar.gz
+N dist/subvertpy-0.9.0.tar.gz
+N dist/testtools-0.9.15.tar.gz
+N dist/zope.app.testing-3.10.0.tar.gz
+N dist/zope.testbrowser-4.0.2.tar.gz
-D dist/auditor-0.0.1.tar.gz
-D dist/auditor-0.0.2.tar.gz
-D dist/auditorclient-0.0.1.tar.gz
-D dist/auditorfixture-0.0.1.tar.gz
-D dist/auditorfixture-0.0.2.tar.gz
-D dist/auditorfixture-0.0.3.tar.gz
All changes applied successfully.
Updated to revision 518 of branch http://bazaar.launchpad.net/~launchpad/lp-source-dependencies/trunk
Traceback (most recent call last):
  File "bin/test", line 55, in <module>
    djangorecipe.test.main('oopstools.settings', 'oopstools')
  File "/home/pqm/pqm-workdir/oops-tools/eggs/djangorecipe-0.19.2-py2.6.egg/djangorecipe/test.py", line 16, in main
    management.execute_manager(settings, argv=argv)
  File "/home/pqm/pqm-workdir/oops-tools/parts/django/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/home/pqm/pqm-workdir/oops-tools/parts/django/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/pqm/pqm-workdir/oops-tools/parts/django/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__...

Read more...

Revision history for this message
Launchpad PQM Bot (launchpad-pqm) wrote :
Download full text (4.2 KiB)

The attempt to merge lp:~lifeless/python-oops-tools/bug-1048470 into lp:python-oops-tools failed.Below is the output from the failed tests.

find . -type f -name '*.py[co]' -exec rm -f {} \;
rm -f bin/buildout
rm -f src/oopstools/settings.py
bzr clean-tree --unknown --force
bzr up download-cache
python bootstrap.py \
  --setup-source=download-cache/ez_setup.py \
  --download-base=download-cache/dist --eggs=eggs
Download error: [Errno 111] Connection refused -- Some packages may not be found!
Download error: [Errno 111] Connection refused -- Some packages may not be found!
Generated script '/home/pqm/pqm-workdir/oops-tools/bin/buildout'.
bin/buildout configuration:db-port=5433
Develop: '/home/pqm/pqm-workdir/oops-tools/.'
Uninstalling filetemplates.
Updating scripts.
Installing filetemplates.
Updating django.
Updating docs.
Updating tags.
bin/test
Creating test database for alias 'default'...

W: line 4 [buildbot-staging]: Deprecated key 'location' used
I: This option will be removed in the future; please update your configuration
W: line 2 [pqm]: Deprecated key 'location' used
I: This option will be removed in the future; please update your configuration
W: line 3 [pqm-oops-tools]: Deprecated key 'location' used
I: This option will be removed in the future; please update your configuration
W: line 1 [precise]: Deprecated key 'location' used
I: This option will be removed in the future; please update your configuration
I: [pqm-oops-tools chroot] Running command: "cd /home/pqm/pqm-workdir/oops-tools && make check"
Nothing to delete.
Tree is up to date at revision 518 of branch http://bazaar.launchpad.net/~launchpad/lp-source-dependencies/trunk
Traceback (most recent call last):
  File "bin/test", line 55, in <module>
    djangorecipe.test.main('oopstools.settings', 'oopstools')
  File "/home/pqm/pqm-workdir/oops-tools/eggs/djangorecipe-0.19.2-py2.6.egg/djangorecipe/test.py", line 16, in main
    management.execute_manager(settings, argv=argv)
  File "/home/pqm/pqm-workdir/oops-tools/parts/django/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/home/pqm/pqm-workdir/oops-tools/parts/django/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/pqm/pqm-workdir/oops-tools/parts/django/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/pqm/pqm-workdir/oops-tools/parts/django/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/home/pqm/pqm-workdir/oops-tools/eggs/South-0.7.3_r929-py2.6.egg/south/management/commands/test.py", line 8, in handle
    super(Command, self).handle(*args, **kwargs)
  File "/home/pqm/pqm-workdir/oops-tools/parts/django/django/core/management/commands/test.py", line 37, in handle
    failures = test_runner.run_tests(test_labels)
  File "/home/pqm/pqm-workdir/oops-tools/parts/django/django/test/simple.py", line 359, in run_tests
    old_config = self.setup_databases()
  File "/home/pqm/pqm-workdir/oops-tools/parts/django/django/test/simple.py", line 296, in setup_databases
    test_db_n...

Read more...

39. By Robert Collins

This fixes handling of non-unicode pageids, which were stored OK in the DB, but broke HTML report rendering.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/oopstools/NEWS.txt'
--- src/oopstools/NEWS.txt 2012-07-27 04:27:53 +0000
+++ src/oopstools/NEWS.txt 2012-09-10 05:30:26 +0000
@@ -8,6 +8,9 @@
8* Reports have a per-report email address that can be set, to allow different8* Reports have a per-report email address that can be set, to allow different
9 reports to go to different addresses. (Robert Collins)9 reports to go to different addresses. (Robert Collins)
1010
11* HTML reports can be created for non-ascii OOPS topics.
12 (Robert Collins, #1048470)
13
110.6.2140.6.2
12=====15=====
1316
1417
=== modified file 'src/oopstools/oops/dbsummaries.py'
--- src/oopstools/oops/dbsummaries.py 2011-12-15 12:38:18 +0000
+++ src/oopstools/oops/dbsummaries.py 2012-09-10 05:30:26 +0000
@@ -134,6 +134,7 @@
134 data['pageid'] = 'Unknown'134 data['pageid'] = 'Unknown'
135 if data['pageid'] == '':135 if data['pageid'] == '':
136 data['pageid'] = 'Unknown'136 data['pageid'] = 'Unknown'
137 data['pageid'] = _escape(data['pageid'])
137 data['escaped_url'] = _escape(data['url'])138 data['escaped_url'] = _escape(data['url'])
138 data['errors'] = data['errors'].split(',')139 data['errors'] = data['errors'].split(',')
139 data['errors'].sort()140 data['errors'].sort()
@@ -457,7 +458,8 @@
457 fp.write('<td>%s</td>\n<td><a href="%s">%s</a></td>'458 fp.write('<td>%s</td>\n<td><a href="%s">%s</a></td>'
458 '\n<td>%s</td>\n' % (459 '\n<td>%s</td>\n' % (
459 self.field_format % value,460 self.field_format % value,
460 get_absolute_url(oopsids[0]), oopsids[0], pageid))461 get_absolute_url(oopsids[0]), oopsids[0].encode('utf8'),
462 _escape(pageid)))
461 fp.write('</tr>\n')463 fp.write('</tr>\n')
462 fp.write('</table>')464 fp.write('</table>')
463 fp.write('</div>')465 fp.write('</div>')
464466
=== modified file 'src/oopstools/oops/test/test_dbsummaries.py'
--- src/oopstools/oops/test/test_dbsummaries.py 2011-12-13 15:10:47 +0000
+++ src/oopstools/oops/test/test_dbsummaries.py 2012-09-10 05:30:26 +0000
@@ -36,6 +36,7 @@
36 'type': 'Exception',36 'type': 'Exception',
37 'value': u'a unicode char (\xa7)',37 'value': u'a unicode char (\xa7)',
38 'time': datetime(2008, 1, 13, 23, 14, 23, 00, utc),38 'time': datetime(2008, 1, 13, 23, 14, 23, 00, utc),
39 'topic': u'more unicode \xa7',
39 }40 }
40 ignored = parsed_oops_to_model_oops(41 ignored = parsed_oops_to_model_oops(
41 python_oops, 'test_unicode_handling')42 python_oops, 'test_unicode_handling')
@@ -53,3 +54,4 @@
53 fp = StringIO()54 fp = StringIO()
54 self.summary.renderHTML(fp)55 self.summary.renderHTML(fp)
55 self.assertThat(fp.getvalue(), Contains('a unicode char (\xc2\xa7)'))56 self.assertThat(fp.getvalue(), Contains('a unicode char (\xc2\xa7)'))
57 self.assertThat(fp.getvalue(), Contains('more unicode \xc2\xa7'))

Subscribers

People subscribed via source and target branches

to all changes: