doctests failing on Centos 6 due to "unprintable" error objects
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
Incomplete
|
High
|
Unassigned |
Bug Description
On Centos 6 (64 bit), the following tests fail due to what looks like some kind of Python object printing quirk with the version that ships with RHEL 6 and derivatives:
src/
src/
The errors all look like this:
File "/home/
Failed example:
gwen_
Differences (ndiff with -expected +actual):
Traceback (most recent call last):
- ...
- UnverifiedAddre
+ File "/usr/lib64/
+ compileflags, 1) in test.globs
+ File "<doctest membership.
+ gwen_member.address = new_address
+ File "/home/
+ raise UnverifiedAddre
+ UnverifiedAddre
The system reports Python version 2.6.5.
This error does not seem to occur with Python 2.7 on Ubuntu 11.04.
One possibility is that for some reason when it comes to printing out those error objects, Python doesn't have a default encoding scheme for representing the embedded unicode strings in that particular context (email address in the above example).
Changed in mailman: | |
status: | New → Triaged |
importance: | Undecided → High |
A quick fix to this is to convert the unicode addresses to string objects in the __str__ methods for those Error classes. The attached patch does just that, causing the tests to pass unchanged on Centos 6.